OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man3 / setlocale.3
index 93e13ca..5df6cd1 100644 (file)
@@ -29,7 +29,7 @@
 .\" Modified Tue Aug 24 17:11:01 1999 by Andries Brouwer (aeb@cwi.nl)
 .\" Modified Tue Feb  6 03:31:55 2001 by Andries Brouwer (aeb@cwi.nl)
 .\"
-.TH SETLOCALE 3  2008-12-05 "GNU" "Linux Programmer's Manual"
+.TH SETLOCALE 3  2014-05-28 "GNU" "Linux Programmer's Manual"
 .SH NAME
 setlocale \- set the current locale
 .SH SYNOPSIS
@@ -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
@@ -85,7 +93,7 @@ Such a string is either a well-known constant like "C" or "da_DK"
 .PP
 If
 .I locale
-is
+is an empty string,
 .BR """""" ,
 each part of the locale that should be modified is set according to the
 environment variables.
@@ -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.
@@ -172,21 +175,6 @@ locale.
 The return value is NULL if the request cannot be honored.
 .SH CONFORMING TO
 C89, C99, POSIX.1-2001.
-.SH NOTES
-Linux (that is, glibc) supports the portable locales
-.BR """C""" " and " """POSIX""" .
-In the good old days there used to be support for
-the European Latin-1
-.B """ISO-8859-1"""
-locale (e.g., in libc-4.5.21 and libc-4.6.27), and the Russian
-.B """KOI-8"""
-(more precisely, "koi-8r") locale (e.g., in libc-4.6.27),
-so that having an environment variable \fILC_CTYPE=ISO-8859-1\fP
-sufficed to make
-.BR isprint (3)
-return the right answer.
-These days non-English speaking Europeans have to work a bit harder,
-and must install actual locale files.
 .SH SEE ALSO
 .BR locale (1),
 .BR localedef (1),
@@ -198,3 +186,12 @@ and must install actual locale files.
 .BR strftime (3),
 .BR charsets (7),
 .BR locale (7)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.