Installation guide

Table 4–2: Locale Environment Variables (cont.)
Environment Variable Description
LC_TIME Specifies the date and time format.
LC_MESSAGES Specifies the language in which system messages will
appear. In addition, specifies the strings that indicate
‘‘yes’’ and ‘‘no’’ in yes/no prompts.
As with the LANG environment variable, you can assign all of the category
variables locale names. For example, suppose that your company’s main
language is Spanish. You can set the locale with the LANG environment
variable for Spanish, but set the numeric and monetary format for U.S.
English. To do this for the C shell, you would make the following variable
assignments:
% setenv LANG es_ES.ISO8859-1
% setenv LC_NUMERIC en_US.ISO8859-1
% setenv LC_MONETARY en_US.ISO8859-1
Locale names may include @
modifiers
to indicate versions of the locales
that meet special requirements for different categories.
For example, a locale might exist in two versions to sort data two ways: in
dictionary order and in telephone-book order. Suppose your site is in
France, uses the default French locale, and the standard setup for this
locale uses dictionary order. However, your site also needs to use a
site-defined locale that collates data in telephone-book order. You might set
your environment variables for the C shell as follows:
% setenv LANG fr_FR.ISO8859-1
% setenv LC_COLLATE fr_FR.ISO8859-1@phone
The explicit setting of LC_COLLATE overrides LANG’s implicit setting of
that portion of the locale.
4.2.3 Limitations of Locale Variables
The LANG and LC_* environment variables allow you to set the locale the
way you want it, but they do not protect you from mistakes. There is
nothing to protect you from setting LANG to a Swedish locale and
LC_CTYPE to a Portuguese locale.
Also, there is no way to tie locale information to data. This means that the
system has no way of knowing what locale you set when you created a file,
and it does not prevent you from processing that data in inappropriate
ways later. For example, suppose LANG was set to a German locale when
you created file foo. Now suppose you reset LANG to a Spanish locale and
4–18 Customizing the System Environment