I am implementing gettext into a website, but for some reason, the pages keep swapping between the intended translated language (French), and the primary language (English).
I'm using RedHat 7.3, with gettext-0.11.1-2 RPM. At the top of every page, I have this code: setlocale(LC_ALL, 'fr_FR'); bindtextdomain('messages', $_SERVER['DOCUMENT_ROOT'].'/locale'); textdomain('messages'); And on my testing page, I have gettext() calls surrounding any outputted text. Upon checking the returned result of setlocale, it is indeed 'fr_FR'. I have created a messages.po file (via "xgettext -n *.php"), and put in the translated text. I then created the messages.mo file (via "msgfmt messages.po"). These are both placed in the following directory: /home/web/website/locale/fr_FR/LC_MESSAGES Now, when I load up the web page, everything *should* be French. Sometimes it is. But sometimes it's English instead. It's a 50/50 thing. I've verified that the "setlocale" call is ALWAYS using "fr_FR". Can anyone help me out? (And as an aside, can the gettext parameter span multiple lines, or must it be on one line?) -- Aaron Gould -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php