Somehow got lists mixed up [duh!]. Ignore that last one.
Gary


On Tuesday, February 25, 2003, at 11:02 pm, Robert Masse wrote:


Hello you all,

I have a problem using gettext with PHP 4.3.1 :

If I put :

putenv("LANG=en_CA");
$setloc = setlocale(LC_ALL, "");

the value of $setloc shows me that the LC_xxx variables have been set to
en_CA, *excepted* for the following ones :
LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;LC_TIME=fr_FR;LC_COLLATE=fr_FR;LC_MONET ARY=f
r_FR;LC_MESSAGES=fr_FR
I suppose this is because those ones are defined on the server.


It means that gettext will look in ./locale/fr_FR/LC_MESSAGES to find the
translation file and, of course, it means that no matter which language I
choose, it will *always* use the same file.


I tried using setlocale(LC_MESSAGES, en_CA) which seems to work (return
value = "en_CA") but, anyhow, gettext still uses the same fr_FR value to
find the translation file.


If I try to change the LC_MESSAGES value by hand in the shell, the value is
changed but has no effect on my script results.
If I do not put setlocale(), gettext never translates anything even with
LANG set to something.


In short : if I use setlocale(), the system ALWAYS use fr_FR and if I do not
use setlocale() it doesn't translate at all ...


Could someone help me ?

Robert Masse



--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to