Problems with internationalization
| From: | Aaron Gould | Date: | Thu, 16 Sep 2004 17:10:29 +0000 |
| Subject: | Problems with internationalization | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196880@lists.php.net to get a copy of this message | ||
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_MESSAGESThere 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