Re: can't get gettext() to work!
| From: | Colin Viebrock | Date: | Fri, 03 Aug 2001 14:53:32 +0000 |
| Subject: | Re: can't get gettext() to work! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61139@lists.php.net to get a copy of this message | ||
"Richard Lynch" <ceo@l-i-e.com> wrote in message
news:050001c11be5$c93a81c0$6401a8c0@Lynchux100...
> > setlocale(LC_ALL, '');
>
> > putenv('LANG=fr'); /* <<< changed here */
> > setlocale(LC_ALL, '');
>
> WILD GUESS ALERT!
>
> My gut says you need setlocale(LC_ALL, 'fr') or similar in the French
one...
After much fiddling, I found that, for some reason, I always need to use the
"long" version of the language codes. "LANG=fr" didn't work, but
"LANG=fr_FR" did.
I then need to pass '' or 'fr_FR' to setlocale(), and all is working.
Thanks for the guess, though. :)
- Colin