Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to understand the locales used in Linux. On my Ubuntu 11.10 system locale puts out the following:


(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

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

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .