1LOCALE(5) Linux User Manual LOCALE(5)
2
3
4
6 locale - Describes a locale definition file
7
9 The locale definition files contains all the information that the
10 localedef(1) command needs to convert it into the binary locale data‐
11 base.
12
13 The definition files consist of sections which each describe a locale
14 category in detail.
15
17 The locale definition file starts with a header that may consist of the
18 following keywords:
19
20 <escape_char>
21 is followed by a character that should be used as the escape-
22 character for the rest of the file to mark characters that
23 should be interpreted in a special way. It defaults to the back‐
24 slash ( \ ).
25
26 <comment_char>
27 is followed by a character that will be used as the comment-
28 character for the rest of the file. It defaults to the number
29 sign (#).
30
31
32 The locale definition has one part for each locale category. Each part
33 can be copied from another existing locale or can be defined from
34 scratch. If the category should be copied, the only valid keyword in
35 the definition is copy followed by the name of the locale which should
36 be copied.
37
38
39 LC_CTYPE
40 The definition for the LC_CTYPE category starts with the string
41 LC_CTYPE in the first column.
42
43 There are the following keywords allowed:
44
45
46 upper followed by a list of uppercase letters. The letters A trough Z
47 are included automatically. Characters also specified as cntrl,
48 digit, punct, or space are not allowed.
49
50
51 lower followed by a list of lowercase letters. The letters a trough z
52 are included automatically. Characters also specified as cntrl,
53 digit, punct, or space are not allowed.
54
55
56 alpha followed by a list of letters. All character specified as either
57 upper or lower are automatically included. Characters also spec‐
58 ified as cntrl, digit, punct, or space are not allowed.
59
60
61 digit followed by the characters classified as numeric digits. Only
62 the digits 0 trough 9 are allowed. They are included by default
63 in this class.
64
65
66 space followed by a list of characters defined as white-space charac‐
67 ters. Characters also specified as upper, lower, alpha, digit,
68 graph, or xdigit are not allowed. The characters <space>, <form-
69 feed>, <newline>, <carriage-return>, <tab>, and <vertical-tab>
70 are automatically included.
71
72
73 cntrl followed by a list of control characters. Characters also spec‐
74 ified as upper, lower, alpha, digit, punct, graph, print, or
75 xdigit are not allowed.
76
77 punct followed by a list of punctuation characters. Characters also
78 specified as upper, lower, alpha, digit, cntrl, xdigit, or the
79 <space> character are not allowed.
80
81
82 graph followed by a list of printable characters, not including the
83 <space> character. The characters defined as upper, lower,
84 alpha, digit, xdigit, and punct are automatically included.
85 Characters also specified as cntrl are not allowed.
86
87
88 print followed by a list of printable characters, including the
89 <space> character. The characters defined as upper, lower,
90 alpha, digit, xdigit, punct, and the <space> character are auto‐
91 matically included. Characters also specified as cntrl are not
92 allowed.
93
94
95 xdigit followed by a list of characters classified as hexadecimal dig‐
96 its. The decimal digits must be included followed by one or more
97 set of six characters in ascending order. The following charac‐
98 ters are included by default: 0 trough 9, a trough f, A trough
99 F.
100
101
102 blank followed by a list of characters classified as blank. The char‐
103 acters <space> and <tab> are automatically included.
104
105
106 toupper
107 followed by a list of mappings from lowercase to uppercase let‐
108 ters. Each mapping is a pair of a lowercase and an uppercase
109 letter separated with a , and enclosed in parentheses. The mem‐
110 bers of the list are separated with semicolons.
111
112 tolower
113 followed by a list of mappings from uppercase to lowercase let‐
114 ters. If the keyword tolower is not present, the reverse of the
115 toupper list is used.
116
117
118 The LC_CTYPE definition ends with the string END LC_CYTPE.
119
120
121 LC_COLLATE
122 The LC_COLLATE category defines the rules for collating characters. Due
123 to limitations of libc not all POSIX-options are implemented.
124
125 The definition starts with the string LC_COLLATE in the first column.
126
127 There are the following keywords allowed:
128
129
130 collating-element
131
132
133 collating-symbol
134
135
136 The order-definition starts with a line:
137
138 order_start
139
140 followed by a list of keywords out of forward, backward, or position.
141 The order definition consists of lines that describe the order and is
142 terminated with the keyword
143
144 order_end.
145
146 For more details see the sources in /usr/lib/nls/src notably the exam‐
147 ples POSIX, Example and Example2
148
149
150 The LC_COLLATE definition ends with the string ENDLC_COLLATE.
151
152
153 LC_MONETARY
154 The definition starts with the string LC_MONETARY in the first column.
155
156 There are the following keywords allowed:
157
158
159 int_curr_symbol
160 followed by the international currency symbol. This must be a
161 4-character string containing the international currency symbol
162 as defined by the ISO 4217 standard (three characters) followed
163 by a separator.
164
165 currency_symbol
166 followed by the local currency symbol.
167
168 mon_decimal_point
169 followed by the string that will be used as the decimal delim‐
170 iter when formatting monetary quantities.
171
172 mon_thousands_sep
173 followed by the string that will be used as a group separator
174 when formatting monetary quantities.
175
176 mon_grouping
177 followed by a string that describes the formatting of numeric
178 quantities.
179
180 positive_sign
181 followed by a string that is used to indicate a positive sign
182 for monetary quantities.
183
184 negative_sign
185 followed by a string that is used to indicate a negative sign
186 for monetary quantities.
187
188 int_frac_digits
189 followed by the number of fractional digits that should be used
190 when formatting with the int_curr_symbol.
191
192 frac_digits
193 followed by the number of fractional digits that should be used
194 when formatting with the currency_symbol.
195
196 p_cs_precedes
197 followed by an integer set to 1 if the currency_symbol or
198 int_curr_symbol
199 should precede the formatted monetary quantity or set to 0 if
200 the symbol succeeds the value.
201
202 p_sep_by_space
203 followed by an integer.
204
205 0 means that no space should be printed between the symbol
206 and the value.
207
208 1 means that a space should be printed between the symbol
209 and the value.
210
211 2 means that a space should be printed between the symbol
212 and the sign string, if adjacent.
213
214 n_cs_precedes
215
216 0 - the symbol succeeds the value.
217
218 1 - the symbol precedes the value.
219
220 n_sep_by_space
221 An integer set to 0 if no space separates the currency_symbol or
222 int_curr_symbol from the value for a negative monetary quantity,
223 set to 1 if a space separates the symbol from the value and set
224 to 2 if a space separates the symbol and the sign string, if
225 adjacent.
226
227 p_sign_posn
228
229 0 Parentheses enclose the quantity and the currency_symbol
230 or int_curr_symbol.
231
232 1 The sign string precedes the quantity and the cur‐
233 rency_symbol or the int_curr_symbol.
234
235 2 The sign string succeeds the quantity and the cur‐
236 rency_symbol or the int_curr_symbol.
237
238 3 The sign string precedes the currency_symbol or the
239 int_curr_symbol.
240
241 4 The sign string succeeds the currency_symbol or the
242 int_curr_symbol.
243
244 n_sign_posn
245
246 0 Parentheses enclose the quantity and the currency_symbol
247 or int_curr_symbol.
248
249 1 The sign string precedes the quantity and the cur‐
250 rency_symbol or the int_curr_symbol.
251
252 2 The sign string succeeds the quantity and the cur‐
253 rency_symbol or the int_curr_symbol.
254
255 3 The sign string precedes the currency_symbol or the
256 int_curr_symbol.
257
258 4 The sign string succeeds the currency_symbol or the
259 int_curr_symbol.
260
261 The LC_MONETARY definition ends with the string END LC_MONETARY.
262
263
264 LC_NUMERIC
265 The definition starts with the string LC_NUMERIC in the first column.
266
267 The following keywords are allowed:
268
269
270 decimal_point
271 followed by the string that will be used as the decimal delim‐
272 iter when formatting numeric quantities.
273
274 thousands_sep
275 followed by the string that will be used as a group separator
276 when formatting numeric quantities.
277
278 grouping
279 followed by a string that describes the formatting of numeric
280 quantities.
281
282 The LC_NUMERIC definition ends with the string END LC_NUMERIC.
283
284
285 LC_TIME
286 The definition starts with the string LC_TIME in the first column.
287
288 The following keywords are allowed:
289
290
291 abday followed by a list of abbreviated weekday names. The list starts
292 with Sunday or its translation.
293
294 day followed by a list of weekday names. The list starts with Sun‐
295 day.
296
297 abmon followed by a list of abbreviated month names.
298
299 mon followed by a list of month names.
300
301 am_pm The appropriate representation of the am and pm strings.
302
303 d_t_fmt
304 The appropriate date and time format.
305
306 d_fmt The appropriate date format.
307
308 t_fmt The appropriate time format.
309
310 t_fmt_ampm
311 The appropriate time format when using 12h clock format.
312
313 The LC_TIME definition ends with the string END LC_TIME.
314
315
316 LC_MESSAGES
317 The definition starts with the string LC_MESSAGES in the first column.
318
319 The following keywords are allowed:
320
321
322 yesexpr
323 followed by a regular expression that describes possible yes-
324 responses.
325
326 noexpr followed by a regular expression that describes possible no-
327 responses.
328
329
330 The LC_MESSAGES definition ends with the string END LC_MESSAGES.
331
332 See the POSIX.2 standard for details.
333
335 /usr/lib/locale/ — database for the current locale setting of that cat‐
336 egory
337 /usr/lib/nls/charmap/* — charmap-files
338
340 The manpage isn't complete.
341
343 POSIX.2
344
346 locale(1), localedef(1), localeconv(3), setlocale(3), charmap(5)
347
348
349
350National Language Support 1994-11-09 LOCALE(5)