note 21251 added to function.gettext

From: Date: Sun, 05 May 2002 09:27:04 +0000
Subject: note 21251 added to function.gettext
Groups: php.notes 
Request: Send a blank email to php-notes+get-30204@lists.php.net to get a copy of this message
There's a good tutorial to the GetText tools used with PHP at http://zez.org/article/articleview/42 The only modification I needed to do was to use the correct ISO-language/country-codes (don't know the ISO number) and call setlocale. helloworld.php: putenv("LC_ALL=da_DK"); // For danish/Denmark setlocale(LC_ALL, ""); // ./locale/da/LC_MESSAGES holds the helloworld.mo file bindtextdomain("helloworld", "./locale"); textdomain("helloworld"); print(gettext("Hello world!")); I had a lot of trouble getting this to work on Red Hat (Yellow Dog) Linux though. -- http://www.php.net/manual/en/function.gettext.php http://master.php.net/manage/user-notes.php?action=edit+21251 http://master.php.net/manage/user-notes.php?action=delete+21251 http://master.php.net/manage/user-notes.php?action=reject+21251

« previous php.notes (#30204) next »