Am Tue, 14 Dec 2004 16:35:50 -0500 schrieb Michael Jennings:

> This doesn't seem right to me.  setlocale(LC_ALL, "") is the correct,
> portable way to set up locale information so that you can subsequently
> use nl_langinfo() and friends.  $LANG is not the only env var that
> comes into play with locale setup.
> 
> From the locale(7) man page:
>
> [...]
> 
> Note that $LANG is *last*, not first.

I don't know how to handle this language problem. At first I used
setlocale (LC_ALL, NULL); to get the current locale for help. This
worked well on my and most other systems. But then someone reported me a
problem that on his system this doesn't work. I expect a return of one
locale like "[EMAIL PROTECTED]". But this person get this result:

LC_CTYPE=en_US;LC_NUMERIC=en_US;LC_TIME=en_US;LC_COLLATE=C;LC_MONETARY=
en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=en_US;LC_ADDRESS=en_US;L
C_TELEPHONE=en_US;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=en_US

After some time I found the reason: setlocale (LC_ALL, NULL); seems to
return all values If not all locales have the same value. (see:
LC_COLLATE=C, others=en_US). So I used only LC_MESSAGES to get the
locale and avoid this problems. Do you think I should return to
LC_MESSAGES and use LANG as fallback if LC_MESSAGES is empty?

regards
Andreas


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to