23
6
It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language.
What are the exact semantics of these variables and where can I read about their correct usage? The manpage for locale(1) only mentions the LC_* family of environment variables. Additionally there is also an LC_ALL variable commonly in place which isn't described there either.
1@Rémi can you elaborate on why
LC_ALL
should not be used? – Édouard Lopez – 2016-02-02T12:21:34.8331Not much to say. You have more flexibility if you set LANG than if you set LC_ALL: you can set LANG to something and LC_COLLATE to some other thing. If you set LC_ALL, every other configuration are hidden. – Rémi – 2016-02-03T22:35:15.560
2I don't think
LC_ALL
overridesLANGUAGE
:6
start="2">
gettext gives preference to LANGUAGE over LC_ALL and LANG
. Additionally, the chapter Locale Environment Variables states:1. LANGUAGE 2. LC_ALL [...]
1Where can I find documentation about LANGUAGE? Is it mutually exclusive to LC_MESSAGES? – aef – 2012-02-22T00:44:29.797
Everything is in the locale(7) manpage. LC_MESSAGES changes the language messages are displayed in and what an affirmative or negative answer looks like. The GNU C-library contains the gettext(3), ngettext(3), and rpmatch(3) functions to ease the use of these information. The GNU gettext family of functions also obey the environment variable LANGUAGE (containing a colon-separated list of locales) if the category is set to a valid locale other than "C". – Rémi – 2012-02-24T15:08:40.907