|
First, instead of looking at "${LANG:-}" for choosing the language, we
now use LC_MESSAGES from the locale(1) command. LC_MESSAGES is the
appropriate place to look at, and it inherits the value of $LANG by
default, but can be overriden so that the text messages from a program
spits out strings from a language, but use everything else from
$LANG (such as LC_NUMERIC), like in:
LANG=abc
LC_MESSAGES=zzz
I took this opportunity to look only at the language and country part
of the locale, and not at the codeset or modifier (as in
ll_CC.CODESET@modifier), so that as long as the language+country is the
same, it uses the according message.
This addresses the
"Maybe it could be less restrictive of country or encoding" comment on
|