Hi,
Tuesday, November 25, 2003, 2:25:33 AM, you wrote:
M> Hi there,
M> I am trying to get I18n support working on my site. To do this I have
M> isntalled gettext.
M> Somehow the translation does not work. I did everything the examples
M> explained, but I do stillg get en text.
M> Here is what I did.
M> 1. I creaed a test file:
M> <?php
M> // I18N support information here
M> $language = 'de';
M> putenv("LANG=$language");
M> setlocale(LC_ALL, $language);
M> // Set the text domain as 'messages'
M> $domain = 'messages';
M> bindtextdomain($domain, "/home/www/mydocs/x_dev/sprachen/gettext/locale");
M> textdomain($domain);
M> echo gettext("A string to be translated would go here");
?>>
M> 2. I extracted the text via command line:
M> xgettext -a test.php
M> 3. I translated it and created a mo file with poedit (editor)
M> 4. I moved the files into a de directory
M> /locale
M> /de
M> /LC_MESSAGES
M> messages.po
M> When I load the php file in the browser it still gives me the entlish
M> language.
M> Has anybody an idea on what I am doing wrong?
M> Thank you for any help on that,
M> Merlin
If on linux you may need to generate the right files with something like:
localedef -ci de_DE -f ISO_8859-1:1987 de_DE
Then restart apache as it caches locale info I think
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php