Hi
I'm using gettext to add i18n to a web site, and it seems to work fine,
but the translation is done randomly. I mean that if you reload many times
the page, sometimes it gives back the translated message and sometimes the
untranslated one.
These are the steps I followed to use gettext with php:

putenv("LANG=it");
setlocale(LC_ALL, "it");
bindtextdomain("test", ".");
textdomain("test");
print(gettext("This is a test message"));

xgettext -d test test.php

in the test.po file i have
msgid ""
"This is a test message"
msgstr ""
"Questo e un messaggio di prova"

msgfmt -vvvv -o test.mo test.po
mkdir -p it/LC_MESSAGES
mv test.mo it/LC_MESSAGES

The OS is FreeBSD 4.6 with apache 1.3.26 and php 4.2.1

Does anybody had the same problem?
Thanks, Marco


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

Reply via email to