]>
Commit | Line | Data |
---|---|---|
73155a29 MK |
1 | .\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com> |
2 | .\" | |
3 | .\" %%%LICENSE_START(VERBATIM) | |
4 | .\" Permission is granted to make and distribute verbatim copies of this | |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
23 | .\" %%%LICENSE_END | |
24 | .\" | |
25 | .TH LOCALE 1 2014-03-10 "Linux" "Linux Programmer's Manual" | |
26 | .SH NAME | |
27 | locale \- get locale-specific information | |
28 | .SH SYNOPSIS | |
29 | .nf | |
30 | .BR locale " [OPTION]" | |
31 | .BR locale " [OPTION] \-a" | |
32 | .BR locale " [OPTION] \-m" | |
33 | .BR locale " [OPTION] NAME..." | |
34 | .fi | |
35 | .SH DESCRIPTION | |
36 | The | |
37 | .B locale | |
38 | command displays information about the current locale, or all locales, | |
39 | on standard output. | |
40 | ||
41 | When invoked without arguments, | |
42 | .B locale | |
43 | displays the current locale settings for each locale category (see | |
44 | .BR locale (5)), | |
45 | based on the settings of the environment variables that control the locale | |
46 | (see | |
47 | .BR locale (7)). | |
48 | ||
49 | If either the | |
50 | .B \-a | |
51 | or the | |
52 | .B \-m | |
53 | option (or one of their long-format equivalents) is specified, | |
54 | the behavior is as follows: | |
55 | .TP | |
56 | .BR \-a ", " \-\-all\-locales | |
57 | Display a list of all available locales. | |
58 | The | |
59 | .B -v | |
60 | option causes the | |
61 | .B LC_IDENTIFICATION | |
62 | metadata about each locale to be included in the output. | |
63 | .TP | |
64 | .BR \-m ", " \-\-charmaps | |
65 | Display the available charmaps (character set description files). | |
66 | .PP | |
67 | The | |
68 | .I locale | |
69 | command can also be provided with one or more arguments, | |
70 | which are the names of locale keywords (for example, | |
71 | .IR date_fmt , | |
72 | .IR ctype-class-names , | |
73 | .IR yesexpr , | |
74 | or | |
75 | .IR decimal_point ) | |
76 | or locale categories (for example, | |
77 | .BR LC_CTYPE | |
78 | or | |
79 | .BR LC_TIME ). | |
80 | For each argument, the following is displayed: | |
81 | .IP * 3 | |
82 | For a locale keyword, the value of that keyword to be displayed. | |
83 | .IP * | |
84 | For a locale category, | |
85 | the values of all keywords in that category are displayed. | |
86 | .PP | |
87 | When arguments are supplied, the following options are meaningful: | |
88 | .TP | |
4edd4149 | 89 | .BR \-c ", " \-\-category\-name |
73155a29 MK |
90 | For a category name argument, |
91 | write the name of the locale category | |
92 | on a separate line preceding the list of keyword values for that category. | |
93 | ||
94 | For a keyword name argument, | |
95 | write the name of the locale category for this keyword | |
96 | on a separate line preceding the keyword value. | |
97 | ||
98 | This option improves readability when multiple name arguments are specified. | |
99 | It can be combined with the | |
100 | .B \-k | |
101 | option. | |
102 | .TP | |
4edd4149 | 103 | .BR \-k ", " \-\-keyword\-name |
73155a29 MK |
104 | For each keyword whose value is being displayed, |
105 | include also the name of that keyword, | |
106 | so that the output has the format: | |
107 | ||
108 | \fIkeyword\fP="\fIvalue\fP" | |
73155a29 MK |
109 | .PP |
110 | The | |
111 | .I locale | |
112 | command also knows about the following options: | |
113 | .TP | |
4edd4149 | 114 | .BR \-v ", " \-\-verbose |
73155a29 MK |
115 | Display additional information for some command-line option and argument |
116 | combinations. | |
117 | .TP | |
4edd4149 | 118 | .BR \-? ", " \-\-help |
73155a29 MK |
119 | Display a summary of command-line options and arguments and exit. |
120 | .TP | |
4edd4149 | 121 | .BR \-\-usage |
73155a29 MK |
122 | Display a short usage message and exit. |
123 | .TP | |
4edd4149 | 124 | .BR \-V ", " \-\-version |
73155a29 MK |
125 | Display the program version and exit. |
126 | .SH CONFORMING TO | |
127 | POSIX.1-2001, POSIX.1-2008 | |
128 | .SH EXAMPLE | |
129 | .nf | |
130 | $ \fBlocale\fP | |
131 | LANG=en_US.UTF\-8 | |
132 | LC_CTYPE="en_US.UTF\-8" | |
133 | LC_NUMERIC="en_US.UTF\-8" | |
134 | LC_TIME="en_US.UTF\-8" | |
135 | LC_COLLATE="en_US.UTF\-8" | |
136 | LC_MONETARY="en_US.UTF\-8" | |
137 | LC_MESSAGES="en_US.UTF\-8" | |
138 | LC_PAPER="en_US.UTF\-8" | |
139 | LC_NAME="en_US.UTF\-8" | |
140 | LC_ADDRESS="en_US.UTF\-8" | |
141 | LC_TELEPHONE="en_US.UTF\-8" | |
142 | LC_MEASUREMENT="en_US.UTF\-8" | |
143 | LC_IDENTIFICATION="en_US.UTF\-8" | |
4edd4149 MK |
144 | LC_ALL= |
145 | ||
73155a29 MK |
146 | $ \fBlocale date_fmt\fP |
147 | %a %b %e %H:%M:%S %Z %Y | |
4edd4149 | 148 | |
73155a29 MK |
149 | $ \fBlocale \-k date_fmt\fP |
150 | date_fmt="%a %b %e %H:%M:%S %Z %Y" | |
4edd4149 | 151 | |
73155a29 MK |
152 | $ \fBlocale \-ck date_fmt\fP |
153 | LC_TIME | |
154 | date_fmt="%a %b %e %H:%M:%S %Z %Y" | |
4edd4149 | 155 | |
73155a29 MK |
156 | $ \fBlocale LC_MESSAGES\fP |
157 | ^[yY].* | |
158 | ^[nN].* | |
159 | Yes | |
160 | No | |
161 | UTF\-8 | |
4edd4149 | 162 | |
73155a29 MK |
163 | $ \fBlocale \-k LC_MESSAGES\fP |
164 | yesexpr="^[yY].*" | |
165 | noexpr="^[nN].*" | |
166 | yesstr="Yes" | |
167 | nostr="No" | |
168 | messages\-codeset="UTF\-8" | |
169 | .fi | |
170 | .SH SEE ALSO | |
171 | .BR locale (5), | |
172 | .BR locale (7) |