I dumped my idea of using the set_Local function and simply stuck with the date() tag. This actually made things more simple as none of the global files had to be changed.
This still wouldn't solve the problem, though, with different languages and the way dates are displayed, as in the US we do month-day-year whereas I needed for russian to display day-month-year. Obviously making changes to the global file would address this however because of the languages of Russian, for example, the word for the month is changed to reflect how it is being declined (i.e. it's case).
So I wrote a simple hack and called it into the header.php file (include XOOPS_ROOT_PATH.'/your_path/your_file_name.php';)
Within this file I start by setting a variable for the date (from what's coded in the global file so to be language friendly) ... well it may be a little easier to just give an example. I'll just simplify this by only using the months of January and February to allow you to see how it works:
Quote:
$mydate = date (_MYDATEFORMAT);
$patterns[1] = "/January/";
$patterns[2] = "/February/";
$replacements[1] = "января";
$replacements[2] = "февраля";
ksort($patterns);
ksort($replacements);
$mynewdate = preg_replace($patterns, $replacements, $mydate);
$xoopsTpl->assign('rus_date' , $mynewdate);
$xoopsTpl->assign('eng_date' , $mydate);
Essentially begin with the date - from there set an array of patterns for the function "ksort" to look for. (I have not only months but also days of the week coded).
Second define an array of replacements that will take the place of the pattern which was defined. In this case I want the English word January to be replaced with the Russian -- note: set_local did this but as I mentinoed did not change the endings correctly.
Third when your arrays are set, have ksort basically sort your patterns with your replacements (i.e. replacement[1] replaces pattern[1] and so on) then create your new variable and use preg_replace do the work of replacing what you earlier defined.
This left me with two date variables, one unique for English readers and the other for Russian. When a person selects their preferred language the proper date is shown (via an if statement in the theme - if the language is English show this, if not then this...)
Does that make sence? I am sure that you can accomplish the very same thing in a tri-lingual environment. For each language you will have to repeat this process. Like if I were to add another language, then I'd have English as my control group (or Russian or any other for that matter - it is just easier in English as the date() function returns English...) The first array, etc., would changing English into Russian, the second from English in to the third, and so on...
I hope this helps.
Blessings,
Chris