3
Yes, it is a general problem with modules and xLanguage.
The truncating functions, that provide extracts of (= short) descriptions or titles, do not take in account the language tags.
This way they become unbalanced and wrong parts are left out by xLanguage.
To correct this, the truncating function in the modules should filter the multi language string of the content or title first for the selected language and then truncate the resulting string to the desired length.
Example code:
$result = substr ( $string , 0, $length );
=>
$module_handler =& xoops_getHandler('module');
$module = $module_handler->getByDirname('xlanguage');
if ($module && $module->getVar('isactive'))
{
global $xlanguage;
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
$result = substr ( xlanguage_ml($string) , 0, $length );
}
else
{
$result = substr ( $string , 0, $length );
}
The same goes for core functions as eg search.