note 11734 modified in function.gettext by didou

From: Date: Mon, 15 Jan 2007 09:23:50 +0000
Subject: note 11734 modified in function.gettext by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121728@lists.php.net to get a copy of this message
Depending on the implementation of gettext used you might have to call the setlocale(LC_ALL, "") command. So your example code would be <?php // Set language to German putenv ("LANG=de"); // set the locale into the instance of gettext setlocale(LC_ALL, ""); // Specify location of translation tables bindtextdomain ("myPHPApp", "./locale"); // Choose domain textdomain ("myPHPApp"); // Print a test message print (gettext ("Welcome to My PHP Application")); ?> NOTE: If setlocale returns NULL the LANG specified is invalid and "not supported". --was-- Depending on the implementation of gettext used you might have to call the setlocale(LC_ALL, "") command. So your example code would be <br> <?php // Set language to German putenv ("LANG=de"); // set the locale into the instance of gettext setlocale(LC_ALL, ""); // Specify location of translation tables bindtextdomain ("myPHPApp", "./locale"); // Choose domain textdomain ("myPHPApp"); // Print a test message print (gettext ("Welcome to My PHP Application")); ?> NOTE: If setlocale returns NULL the LANG specified is invalid and "not supported". http://php.net/manual/en/function.gettext.php

« previous php.notes (#121728) next »