Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet another locale question....



jwb@example.com (Jim Breen) writes:

> >> From: "Stephen J. Turnbull" <turnbull@example.com>

[...]

> >> Do you have LANG set?  Does it at least tell you what locale it's
> >> trying to set?
> 
> Clunk (penny drops). I have "LANG=en_US ja_JP". That was the cause.
> Yes, setting LANG to just "en_US" makes the message go away.
> 
> Makes you wonder what it's trying to do. Was it about to switch all
> messages to Japanese....?

I think so. If you did not set LC_MESSAGES or LANGUAGE, then
LANG will be used to determine the language used for messages.

> Also, that "locale not supported by C library" message is still
> pretty suspect.

There is no locale "en_US ja_JP". You can't use multiple language
in LANG or any of the LC_* variables. But you can do this with
the LANGUAGE environment variable, which is a GNU extension. Here
are the relevant paragraphs from the glibc info pages:

glibc> When developing the message translation functions it was felt that
glibc> the functionality provided by the variables above is not sufficient.

i.e. LANG and the LC_* variables.

glibc> For example, it should be possible to specify more than one locale name.
glibc> Take a Swedish user who better speaks German than English, and a program
glibc> whose messages are output in English by default.  It should be possible
glibc> to specify that the first choice of language is Swedish, the second
glibc> German, and if this also fails to use English.  This is possible with
glibc> the variable `LANGUAGE'.  For further description of this GNU extension
glibc> see *Note Using gettextized software::.

glibc> [...]
glibc> While for the `LC_xxx' variables the value should consist of exactly
glibc> one specification of a locale

same for LANG!

glibc> the `LANGUAGE' variable's value can
glibc> consist of a colon separated list of locale names.  The attentive
glibc> reader will realize that this is the way we manage to implement one of
glibc> our additional demands above: we want to be able to specify an ordered
glibc> list of language.

-- 
Mike Fabian   <mfabian@example.com>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links