need help with gettext i18n

From: Date: Mon, 24 Nov 2003 16:25:33 +0000
Subject: need help with gettext i18n
Groups: php.general 
Request: Send a blank email to php-general+get-170806@lists.php.net to get a copy of this message
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

« previous php.general (#170806) next »