Comment 9 for bug 590108

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, this is how gdm and language-selector address the situation where a user does not want to use the 'standard' language in a given locale. (A common example is a Swedish user who wants to see his desktop in English).

- $LANG defines the general locale, i. e. for currency, time format, paper size etc. (sv_SE.utf8 in above example).
- $LANGUAGE overrides that to define the primary/secondary language for translations (e. g. "en_US:en" in above example)
- $LC_MESSAGES is set to the most preferred language (e. g. en_US.utf8 in above example) for software which does not use $LANGUAGE, e. g. thunderbird.

This leaves the $LC_* variables free for individual further customization.

The other alternative would be to set $LANG as the language, and then set $LC_CURRENCY, $LC_PAPER etc. to the location, but that's a lot more effort and a lot harder to change.

The installer should not set $LANGUAGE from the time zone selector. This is wrong in either case, as $LANGUAGE is defined to not have any notion of a region/location at all.

So ideally the initial question about the language should set $LANGUAGE and $LC_MESSAGES, and the time zone selector should set $LANG. If $LC_MESSAGES and $LANG would match, then it could just set $LANG.