Hi there,

I am trying to get I18n support working on my site. To do this I have isntalled gettext.

Somehow the translation does not work. I did everything the examples explained, but I do stillg get en text.

Here is what I did.

1. I creaed a test file:

<?php

// I18N support information here
$language = 'de';
putenv("LANG=$language");
setlocale(LC_ALL, $language);
// Set the text domain as 'messages'
$domain = 'messages';
bindtextdomain($domain, "/home/www/mydocs/x_dev/sprachen/gettext/locale");
textdomain($domain);
echo gettext("A string to be translated would go here");

?>

2. I extracted the text via command line:
xgettext -a test.php

3. I translated it and created a mo file with poedit (editor)

4. I moved the files into a de directory


/locale /de /LC_MESSAGES messages.po


When I load the php file in the browser it still gives me the entlish language.


Has anybody an idea on what I am doing wrong?

Thank you for any help on that,

Merlin

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



Reply via email to