Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm used to environment variables such as LANG and LC_*, but I recently noticed a LANGUAGE variable on my Ubuntu desktop. It's value was pt_BR:pt:en, and I'm wondering exactly what is meaning is. LANG, for one thing, was pt_BR.UTF-8, so if that first field is supposed to be the default locale/charset, it was at odds with was LANG set.

So, what's the exact meaning and format of LANGUAGE?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

LANGUAGE serves a similar purpose to LANG and LC_MESSAGES in that it controls what language the user interface is displayed in.

The main difference between them is that while LANG and LC_MESSAGES can only take a single locale specifier, LANGUAGE can take a list of colon separated list of locale specifiers.

As an example, this would allow a user to have programs display in Catalan if available and fall back to Spanish if not before finally falling back to untranslated English, which is not possible with the other variables.

The other environment variables are set for the benefit of applications not using gettext for translation that only support the older environment variables.

Ref: http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable

share|improve this answer

LANGUAGE determines the order of preference for user interface message localization with gettext. http://www.gnu.org/software/gettext/manual/gettext.html#The-LANGUAGE-variable

share|improve this answer
    
Thanks for providing the link to where this is actually defined. –  Victor Jan 22 '12 at 17:35

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.