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

Re: LANGUAGE vs LANG



On Sat, Mar 19, 2005 at 10:42:35AM +0100, Miroslav Kure wrote:
> Hi,
> 
> I got this report about weird behaviour of locales:
> 
> After the fresh install of Sarge in Czech language you end up with
> system where (almost) everything is localised to Czech and you can
> read/write iso-8859-2 characters.
> 
> % cat /etc/environment
> LANGUAGE="cs_CZ:cs:en_GB:en"
> LANG=cs_CZ
> 
> Now the problem is when you switch the LANG to english, e.g.
> export LANG=en_GB
> (of course en_GB being generated with dpkg-reconfigure locales),
> it still speaks in Czech, but iso-8859-2 specific characters are
> messed, because en_GB of course uses iso-8859-1 charset.
> 
> You have to either unset LANGUAGE or remember to set it to the same
> value as LANG (e.g. export LANGUAGE="en_GB").
> 
> The question is, what is this variable for?

It gives GNU gettext an ordered list of languages which should be tried
when looking for translated messages.

> In woody and before, where I had to setup the environment manually,
> I didn't use LANGUAGE variable and everything was working ok.
> man locale doesn't talk about this variable either.

It is documented in libc info pages.

You cannot mix encodings, so you should switch to UTF-8:
  LANGUAGE="cs_CZ:en_GB"
  LANG=cs_CZ.UTF-8
Note that this LANGUAGE setting is equivalent to yours, you can run
e.g. "strace ls --help" and see in which order catalogs are looked
for.

Denis



Reply to: