php-i18n Digest 28 Aug 2002 17:53:32 -0000 Issue 120

Topics (messages 313 through 313):

gettext
        313 by: Marco Muratori

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
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

--- End Message ---

Reply via email to