6
I am trying to understand the locales used in Linux. On my Ubuntu 11.10 system locale
puts out the following:
LANG=en_DK.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE=en_GB.UTF-8
LC_NUMERIC="en_DK.UTF-8"
LC_TIME="en_DK.UTF-8"
LC_COLLATE=en_GB.UTF-8
LC_MONETARY="en_DK.UTF-8"
LC_MESSAGES=en_GB.UTF-8
LC_PAPER="en_DK.UTF-8"
LC_NAME="en_DK.UTF-8"
LC_ADDRESS="en_DK.UTF-8"
LC_TELEPHONE="en_DK.UTF-8"
LC_MEASUREMENT="en_DK.UTF-8"
LC_IDENTIFICATION="en_DK.UTF-8"
LC_ALL=
(en_dk
is for using international day format, continental European number formatting (1.234,56) etc.)
I think I understand what the LC_*
family does, that LANG
is the fallback if one of them is not set and that LC_ALL sets all of the LC_*
variables to its value.
What I don't know yet, is what LANGUAGE
is used for. The notation en_GB:en
reminds me of the Accept-Language
HTTP header. With the settings above it would mean, British English is used, if a translation for it exists. Otherwise any existing English translation (en_US, en_AU, ..., whatever) would be used.
Am I right so far?
Also what programs actually obey the LANGUAGE
setting? In how far is it different from LC_MESSAGES
?
Unfortunately, man locale
only documents the LC_*
family. And searching the web for 'linux locale LANGUAGE' or similar is a mute point. (Of course language is a word often used when talking about locales, and it may also be shown just in the output of locale
without being discussed).
Does anybody of you can help me out there?
1Interesting. However to be precise: It overrides all
LC_
variables andLANG
for gettext (according to the post you linked). This is important to note asLC_ALL
is usually not set by default. – zpea – 2012-04-14T04:24:55.880Great! Thank you, @zpea and Ignacio! That cleared up things a lot for me. – seya – 2012-04-14T05:10:01.333