I am having an issue with 'setlocale'. I have created a proper messages.po (and compiled .mo) file in the following directory:

    $_SERVER['DOCUMENT_ROOT']/locale/fr_FR/LC_MESSAGES

There are only two languages -- English and French.

Here's the snippit of code that handles the langage change. It's in my code just before the header is sent:

    $localemsg = setlocale(LC_ALL, 'fr_FR');
    bindtextdomain('messages', $_SERVER['DOCUMENT_ROOT'].'/locale');
    textdomain('messages');

So, I would expect this code to product French wording. Well it does -- but not all the time! When reloading the page constantly, the wording swaps randomly between English and French; all without changing any code!

Has anyone experienced this before?

--
Aaron Gould
Parts Canada - Web Developer

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to