[Konsole-devel] [Bug 149300] konsole sets LANGUAGE for no apparent reason

Mike FABIAN mfabian at suse.de
Mon Sep 24 20:55:46 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=149300         




------- Additional Comments From mfabian suse de  2007-09-24 22:55 -------
It is not necessary to set LANGUAGE if LANG is already set.

For example, if LANG=en_US.UTF-8, and LANGUAGE is unset (and no other
LC_* variables are set), English messages will be used. The priority of
variables which are checked by gettext to choose the language of the
messages is:

     LANGUAGE
     LC_ALL
     LC_MESSAGES
     LANG

The first variable of these which is set determines which language
is used for the messages. LANG and LC_MESSAGES can only be set to 
*one* language. I.e. with these two variables, it is not possible
to say: "I want German messages, but if these are not available Italian",
because one can only set LANG=de_DE.UTF-8 *or* LANG=it_IT.UTF-8, not both
at the same time. For that reason, LANGUAGE (which is a GNU extension)
was invented, it is possible to set it for example like

    LANGUAGE=de_DE.UTF-8:it_IT.UTF-8

and that would use German messages if possible and Italian if not.

If you don't to use this feature to specify a fallback list of languages to
use for the messages, you don't need to set LANGUAGE at all. If only
one locale/language is used it is enough to set only LANG and neither LANGUAGE
nor any of the LC_* variables. 
In that case, better don't set LANGUAGE!

There is no need for konsole to fiddle with the locale environment
variables at all, I think konsole should just leave all of them as they are.
Then gettext will work as expected, gettext will already fall back to 
English when the language requested with the environment variables is not
available.



More information about the konsole-devel mailing list