62
I haven't yet tried your idea, mostly because I stumbled into something a little easier.
Instead of having to force the system to check what the XOOPS language is I placed in the header the following code just around after line 63 where the line $xoopsTpl = new XoopsTpl(); is:
Quote:
$xoopsTpl->assign('the_locale', setlocale (LC_ALL, _SETLOCALE));
$xoopsTpl->assign('the_date' , strftime(_MYDATEFORMAT));
The first line, for lack of understanding AND better words assigns a variable the_locale for the function
setlocale(). You can get a nice definition for the function at
http://www.php.net. I then used a global constant defined in the language file for each language, in this case _SETLOCALE, to en_EN for english and rus_RUS for Russian. This part can be left alone with.
The second function I also ran through the $xoopsTpl to both allow it to be formatted via my global constants but also to let me pull it directly into my theme by using smarty tags, in this once case I just called it in the theme like so:
Quote:
Keeping the system from constantly checking sounds better to me anyway - this way, what ever language files are being read defines the content.
Thanks for your idea though, it at least got me to re-think what I was doing.
blessings,
Chris