setlocale.3: Simply locale category listing and add GNU-specific locale categories

Some information that was here will move to locale(7).

Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-22 15:07:48 +02:00
parent e0396d76b2
commit 348aab3724
1 changed files with 32 additions and 29 deletions

View File

@ -50,29 +50,37 @@ the program's current locale is modified according to the arguments.
The argument
.I category
determines which parts of the program's current locale should be modified.
.TP
.B LC_ALL
for all of the locale.
.TP
.B LC_COLLATE
for regular expression matching (it determines the meaning
of range expressions and equivalence classes) and string collation.
.TP
.B LC_CTYPE
for regular expression matching, character classification, conversion,
case-sensitive comparison, and wide character functions.
.TP
.B LC_MESSAGES
for localizable natural-language messages.
.TP
.B LC_MONETARY
for monetary formatting.
.TP
.B LC_NUMERIC
for number formatting (such as the decimal point and the thousands separator).
.TP
.B LC_TIME
for time and date formatting.
.TS
lB lB
lB l.
Category Governs
LC_ALL All of the locale
LC_ADDRESS T{
Formatting of addresses and
.br
geography-related items (*)
T}
LC_COLLATE String collation
LC_CTYPE Character classification
LC_IDENTIFICATION Metadata describing the locale (*)
LC_MEASUREMENT T{
Settings related to measurements
.br
(metric versus US customary) (*)
T}
LC_MESSAGES Localizable natural-language messages
LC_MONETARY Formatting of monetary values
LC_NAME Formatting of salutations for persons (*)
LC_NUMERIC Formatting of nonmonetary numeric values
LC_PAPER Settings related to the standard paper size (*)
LC_TELEPHONE Formats to be used with telephone services (*)
LC_TIME Formatting of date and time values
.TE
.PP
The categories marked with an asterisk in the above table
are GNU extensions.
For further information on these locale categories, see
.BR locale (7).
.PP
The argument
.I locale
@ -96,12 +104,7 @@ the environment variable
.B LC_ALL
is inspected,
next the environment variable with the same name as the category
.RB ( LC_COLLATE ,
.BR LC_CTYPE ,
.BR LC_MESSAGES ,
.BR LC_MONETARY ,
.BR LC_NUMERIC ,
.BR LC_TIME )
(see the table above),
and finally the environment variable
.BR LANG .
The first existing environment variable is used.