1
Ok finally after many many investigation i found what is wrong in the xoops header when we change the language in Xlanguage and EMLH
The fact that both modules are failed to load local styles, take me to this point that it should be a bug in xoops 2.5.5
unfortunately we dont have any developer from RTL language countries.
Anyway, I finally found it is because the xoops_getConfigOption('language') function wrongly return the language.
xoops_getConfigOption('language') should be equal to $GLOBALS['xoopsConfig']['language']
but they are different.
so i did a temporary solution like this:
in include/functions.php around line 926:
change the xoops_getConfigOption function like this:
function xoops_getConfigOption($option, $type = 'XOOPS_CONF')
{
static $coreOptions = array();
if (is_array($coreOptions) && array_key_exists($option, $coreOptions)) {
return $coreOptions[$option];
}
// START hacked by irmtfan to solve language issue
if ( $option == 'language') {
return $GLOBALS['xoopsConfig'][$option];
}
// END hacked by irmtfan to solve language issue
$ret = false;
$config_handler =& xoops_gethandler('config');
$configs = $config_handler->getConfigsByCat((is_array($type)) ? $type : constant($type));
if ($configs) {
if (isset($configs[$option])) {
$ret = $configs[$option];
}
}
$coreOptions[$option] = $ret;
return $ret;
}
If anybody have better code please contribute.
Now Xlanguage and EMLH can work perfectly. (local stylesheet will be changed based on languages)
bug in the xoops tracker with highest priority:
https://sourceforge.net/tracker/?func=detail&aid=3556902&group_id=41586&atid=430840