Re: cant get gettext to work with php
| From: | Christophe Chisogne | Date: | Tue, 25 Nov 2003 08:30:26 +0000 |
| Subject: | Re: cant get gettext to work with php | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-639@lists.php.net to get a copy of this message | ||
Your question has been answered, but on the php-general list.
Look at that list archives and below (for a Unix/Linux/BSD srv)
Merlin wrote:
$language = 'de';Better $language = 'de_DE'; // see php manual
putenv("LANG=$language"); setlocale(LC_ALL, $language);This should work better: putenv("LANG=de_DE"); putenv("LANGUAGE=de_DE"); // better to be paranoid, works for me putenv("LC_ALL=de_DE"); setlocale(LC_ALL, "de_DE", "german"); (see some user comments in php manual)
When I load the php file in the browser it still gives me the entlish language.Then you can try to reload the apache webserver (because of the gettext cache, which could hide modifications). "/etc/init.d/apache reload" on a Debian GNU/Linux system. "/etc/rc.d/httpd reload" on RedHat likes PS: another possibility is the german locales arent installed correctly on the unix server. (on a Debian Linux: dpkg-reconfigure locales) Christophe