1
hrac
different style.css for different langauges
  • 2003/11/14 15:10

  • hrac

  • Quite a regular

  • Posts: 305

  • Since: 2002/7/15


Is it possible to use two different style.css file for two different languages or two different theme for two different language?

2
ackbarr
Re: different style.css for different langauges

you would have to do some minor core hacking to load different stylesheets based on language.

The function xoops_getcss() in /include/functions.php determines which themed stylesheet to load and the variable $xoopsConfig['language'] stores the current site language. So it should be a fairly simple matter to look for a language specific stylesheet.

3
ackbarr
Re: different style.css for different langauges

If you are squeamish about modifing the core to do this you could probably modify the theme.html file to load a different stylesheet based on the <{$xoops_langcode}> smarty variable

<{if $xoops_langcode eq. 'en'}>
<!-- 
Load English Stylesheet -->
<{elseif 
$xoops_langcode eq. 'it'}>
<!-- 
Load Italian Stylesheet -->
<{/if}>

you can determine what a language's langcode is by looking at /language/<language>/global.php
//%%%%%        LANGUAGE SPECIFIC SETTINGS   %%%%%
define('_CHARSET', 'ISO-8859-1');
define('_LANGCODE', 'it');