11
1 • Install xLanguage (no more hack needed) and create config file
2 • Copy function.xoLanguage.php in www/class/smarty/xoops_plugins and xoSmartyFunctions.php in Frameworks/smarty
3 • In your template (eg theme.html), use this code
<a href="<{xoLanguage tag="lang" language="english"}>" title="English">Englisha>
<a href="<{xoLanguage tag="lang" language="french"}>" title="French">Frencha>
Note : to get flags, just replace Français and English by appropriates icons. You can also use defines (in a morphogenesis theme just add it in language files /english/main.php and /french/main.php)
Eg:
<div id="xo-language">
<a href="<{xoLanguage tag="lang" language="english"}>" title="<{$smarty.const.THEME_ENGLISH}>"><img src="<{xoImgUrl icons/flags/english.png}>" alt="<{$smarty.const.THEME_ENGLISH}>" />a>
<a href="<{xoLanguage tag="lang" language="french"}>" title="<{$smarty.const.THEME_FRENCH}>"><img src="<{xoImgUrl icons/flags/french.png}>" alt="<{$smarty.const.THEME_FRENCH}>"/>a>
div>
Warning : if xolanguage plugin is not in /class/smarty/xoops_plugins ---> blank page !