Next: Setting the Locale, Previous: Choosing Locale, Up: Locales
The purposes that locales serve are grouped into categories, so
that a user or a program can choose the locale for each category
independently. Here is a table of categories; each name is both an
environment variable that a user can set, and a macro name that you can
use as an argument to setlocale.
LC_COLLATEstrcoll
and strxfrm); see Collation Functions.
LC_CTYPELC_MONETARYLC_NUMERICLC_TIMELC_MESSAGESLC_ALLsetlocale to set a single locale for all purposes. Setting
this environment variable overwrites all selections by the other
LC_* variables or LANG.
LANGWhen developing the message translation functions it was felt that the
functionality provided by the variables above is not sufficient. For
example, it should be possible to specify more than one locale name.
Take a Swedish user who better speaks German than English, and a program
whose messages are output in English by default. It should be possible
to specify that the first choice of language is Swedish, the second
German, and if this also fails to use English. This is
possible with the variable LANGUAGE. For further description of
this GNU extension see Using gettextized software.