Re: Re: gettext i18n
| From: | Christophe Chisogne | Date: | Thu, 04 Sep 2003 14:36:58 +0000 |
| Subject: | Re: Re: gettext i18n | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161658@lists.php.net to get a copy of this message | ||
Catalin Trifu wrote:
I would have done this: 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) 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 Perhaps check german locales are correctly installed on the *nix server. (php uses the setlocale() system call). Yes, locales are system specific. It should be better documented in the php manual :(Try: putenv("LANG=de_DE") . '<br>'; putenv("LC_ALL=de_DE") . '<br>'; setlocale(LC_ALL, "de_DE", "german") . '<br>';
I solved it the stupid way, because locale names are different on *nix and windows (ex: fr_BE vs French_Belgium). On my test systems, some aliases were common (french, dutch, german) but the path where php looks for the mo file was different (ex fr_BE vs french, de_DE vs german). So I simply copied the /de_DE dir to /german and so on. (for french, I had fr/, fr_BE/ and french/ as dir for it to work on 2 linux servers and 1 test NT server :( Hope it helps, -- Christophe Chisogne Developper, Publicityweb sprl http://www.publicityweb.combtw! on win32 it works :(