OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man1 / locale.1
index 97dd85c..4623c44 100644 (file)
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH LOCALE 1 2014-03-10 "Linux" "Linux Programmer's Manual"
+.TH LOCALE 1 2014-05-28 "Linux" "Linux User Manual"
 .SH NAME
 locale \- get locale-specific information
 .SH SYNOPSIS
 .nf
-.BR locale " [OPTION]"
-.BR locale " [OPTION] \-a"
-.BR locale " [OPTION] \-m"
-.BR locale " [OPTION] NAME..."
+.BR locale " [\fIoption\fP]"
+.BR locale " [\fIoption\fP] \-a"
+.BR locale " [\fIoption\fP] \-m"
+.BR locale " [\fIoption\fP] \fIname\fP..."
 .fi
 .SH DESCRIPTION
 The
@@ -65,7 +65,7 @@ metadata about each locale to be included in the output.
 Display the available charmaps (character set description files).
 .PP
 The
-.I locale
+.B locale
 command can also be provided with one or more arguments,
 which are the names of locale keywords (for example,
 .IR date_fmt ,
@@ -108,7 +108,7 @@ so that the output has the format:
     \fIkeyword\fP="\fIvalue\fP"
 .PP
 The
-.I locale
+.B locale
 command also knows about the following options:
 .TP
 .BR \-v ", " \-\-verbose
@@ -123,8 +123,15 @@ Display a short usage message and exit.
 .TP
 .BR \-V ", " \-\-version
 Display the program version and exit.
+.SH FILES
+.TP
+.I /usr/lib/locale/locale-archive
+Usual default locale archive location.
+.TP
+.I /usr/share/i18n/locales
+Usual default path for locale definition files.
 .SH CONFORMING TO
-POSIX.1-2001, POSIX.1-2008
+POSIX.1-2001, POSIX.1-2008.
 .SH EXAMPLE
 .nf
 $ \fBlocale\fP
@@ -153,28 +160,54 @@ $ \fBlocale \-ck date_fmt\fP
 LC_TIME
 date_fmt="%a %b %e %H:%M:%S %Z %Y"
 
-$ \fBlocale LC_MESSAGES\fP
-^[yY].*
-^[nN].*
-Yes
-No
+$ \fBlocale LC_TELEPHONE\fP
++%c (%a) %l
+(%a) %l
+11
+1
 UTF\-8
 
-$ \fBlocale \-k LC_MESSAGES\fP
-yesexpr="^[yY].*"
-noexpr="^[nN].*"
-yesstr="Yes"
-nostr="No"
-messages\-codeset="UTF\-8"
+$ \fBlocale \-k LC_TELEPHONE\fP
+tel_int_fmt="+%c (%a) %l"
+tel_dom_fmt="(%a) %l"
+int_select="11"
+int_prefix="1"
+telephone\-codeset="UTF\-8"
+.fi
+
+The following example compiles a custom locale from the
+.I ./wrk
+directory with the
+.BR localedef (1)
+utility under the
+.I $HOME/.locale
+directory, then tests the result with the
+.BR date (1)
+command, and then sets the environment variables
+.B LOCPATH
+and
+.B LANG
+in the shell profile file so that the custom locale will be used in the
+subsequent user sessions:
+
+.nf
+$ \fBmkdir -p $HOME/.locale\fP
+$ \fBI18NPATH=./wrk/ localedef -f UTF-8 -i fi_SE $HOME/.locale/fi_SE.UTF-8\fP
+$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date\fP
+$ \fBecho "export LOCPATH=\\$HOME/.locale" >> $HOME/.bashrc\fP
+$ \fBecho "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc\fP
 .fi
 .SH SEE ALSO
+.BR localedef (1),
+.BR charmap (5),
 .BR locale (5),
 .BR locale (7)
 .SH COLOPHON
-This page is part of release 3.65 of the Linux
+This page is part of release 3.79 of the Linux
 .I man-pages
 project.
 A description of the project,
-and information about reporting bugs,
+information about reporting bugs,
+and the latest version of this page,
 can be found at
 \%http://www.kernel.org/doc/man\-pages/.