Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

It overrides to locale given in $LC_ALL with regards to gettext message catalogs. Otherwise, it's not used.

share|improve this answer
1  
Interesting. However to be precise: It overrides all LC_ variables and LANG for gettext (according to the post you linked). This is important to note as LC_ALL is usually not set by default. –  zpea Apr 14 '12 at 4:24
    
Great! Thank you, @zpea and Ignacio! That cleared up things a lot for me. –  seya Apr 14 '12 at 5:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.