summaryrefslogtreecommitdiffstats
path: root/man5/locale.5
blob: 836663af2413573509654ccfd6e655b6ef7f29c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
.\" Hey Emacs, this is -*- nroff -*-
.\"
.\" This file is part of locale(1) which displays the settings of the
.\" current locale.
.\" Copyright (C) 1994  Jochen Hein (Hein@Student.TU-Clausthal.de)
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
.\"
.TH LOCALE 5 1994-11-09 "National Language Support" "Linux User Manual"
.SH NAME
locale \- Describes a locale definition file
.SH DESCRIPTION
The 
.B locale
definition files contains all the information that the
.BR localedef (1) 
command needs to convert it into the binary locale database.

The definition files consist of sections which each describe a
locale category in detail.
.SH SYNTAX
The locale definition file starts with a header that may consist
of the following keywords:
.TP
.I <escape_char>
is followed by a character that should be used as the
escape-character for the rest of the file to mark characters that
should be interpreted in a special way. It defaults to 
the backslash (
.B \\\\  
).
.TP
.I <comment_char>
is followed by a character that will be used as the
comment-character for the rest of the file. It defaults to the
number sign (#).

.PP
The locale definition has one part for each locale category.
Each part can be copied from another existing locale or
can be defined from scratch. If the category should be copied,
the only valid keyword in the definition is
.B copy
followed by the name of the locale which should be copied.

.SS LC_CTYPE
The definition for the 
.B LC_CTYPE
category starts with the string 
.I LC_CTYPE 
in the first column.

There are the following keywords allowed:

.TP
.I upper
followed by a list of uppercase letters. The letters
.B A
trough
.B Z
are included automatically. Characters also specified as
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.

.TP
.I lower
followed by a list of lowercase letters. The letters
.B a
trough
.B z
are included automatically. Characters also specified as
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.

.TP
.I alpha
followed by a list of letters. All character specified as either
.B upper
or 
.B lower
are automatically included. Characters also specified as
.BR cntrl ,
.BR digit ,
.BR punct ,
or
.B space
are not allowed.

.TP
.I digit
followed by the characters classified as numeric digits. Only the
digits 
.B 0 
trough
.B 9 
are allowed. They are included by default in this class.

.TP
.I space
followed by a list of characters defined as white-space
characters. Characters also specified as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR graph ,
or
.B xdigit
are not allowed. The characters
.BR <space> ,
.BR <form-feed> ,
.BR <newline> ,
.BR <carriage-return> ,
.BR <tab> ,
and
.B <vertical-tab>
are automatically included.

.TP
.I cntrl
followed by a list of control characters.
Characters also specified as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR punct ,
.BR graph ,
.BR print ,
or
.B xdigit
are not allowed.
.TP
.I punct
followed by a list of punctuation characters. Characters also
specified as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR cntrl ,
.BR xdigit ,
or the
.B <space>
character are not allowed.

.TP
.I graph
followed by a list of printable characters, not including the
.B <space>
character. The characters defined as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR xdigit ,
and
.B punct 
are automatically included.
Characters also specified as
.B cntrl
are not allowed.

.TP
.I print
followed by a list of printable characters, including the
.B <space>
character. The characters defined as
.BR upper ,
.BR lower ,
.BR alpha ,
.BR digit ,
.BR xdigit ,
.BR punct ,
and the
.B <space>
character are automatically included.
Characters also specified as
.B cntrl
are not allowed.

.TP
.I xdigit
followed by a list of characters classified as hexadecimal
digits. The decimal digits must be included followed by one or
more set of six characters in ascending order. The following
characters are included by default:
.B 0
trough
.BR 9 ,
.B a
trough
.BR f ,
.B A
trough
.BR F .

.TP
.I blank
followed by a list of characters classified as 
.BR blank .
The characters
.B <space>
and 
.B <tab>
are automatically included.

.TP
.I toupper
followed by a list of mappings from lowercase to uppercase
letters. Each mapping is a pair of a lowercase and an uppercase letter
separated with a 
.B ,
and enclosed in parentheses. The members of the list are separated
with semicolons.
.TP
.I tolower
followed by a list of mappings from uppercase to lowercase
letters. If the keyword tolower is not present, the reverse of the
toupper list is used.

.PP
The 
.B LC_CTYPE
definition ends with the string 
.I END LC_CYTPE.

.SS LC_COLLATE
The 
.B LC_COLLATE 
category defines the rules for collating characters. Due to
limitations of libc not all POSIX-options are implemented.

The definition starts with the string
.B LC_COLLATE
in the first column.

There are the following keywords allowed:

.TP
.I collating-element

.TP
.I collating-symbol

.PP
The order-definition starts with a line:
.TP
.I order_start
.PP
followed by a list of keywords out of
.B forward,
.B backward,
or
.B position.
The order definition consists of lines that describe the order
and is terminated with the keyword
.TP
.I order_end.
.PP

For more details see the sources in 
.B /usr/lib/nls/src
notably the examples
.B POSIX,
.B Example
and 
.B Example2

.PP
The 
.B LC_COLLATE
definition ends with the string 
.I END LC_COLLATE.

.SS LC_MONETARY
The definition starts with the string
.B LC_MONETARY
in the first column.

There are the following keywords allowed:

.TP
.I int_curr_symbol
followed by the international currency symbol. This must be a
4-character string containing the international currency symbol as
defined by the ISO 4217 standard (three characters) followed by a
separator.
.TP
.I currency_symbol
followed by the local currency symbol.
.TP
.I mon_decimal_point
followed by the string that will be used as the decimal delimiter
when formatting monetary quantities.
.TP
.I mon_thousands_sep
followed by the string that will be used as a group separator
when formatting monetary quantities.
.TP
.I mon_grouping
followed by a string that describes the formatting of numeric
quantities. 
.TP
.I positive_sign
followed by a string that is used to indicate a positive sign for
monetary quantities.
.TP
.I negative_sign
followed by a string that is used to indicate a negative sign for
monetary quantities.
.TP
.I int_frac_digits
followed by the number of fractional digits that should be used when
formatting with the 
.B int_curr_symbol.
.TP
.I frac_digits
followed by the number of fractional digits that should be used when
formatting with the 
.B currency_symbol.
.TP
.I p_cs_precedes
followed by an integer set to 
.B 1 
if the
.I currency_symbol
or
.I int_curr_symbol
 should precede the formatted monetary quantity or set to
.B 0
if the symbol succeeds the value.
.TP
.I p_sep_by_space
followed by an integer.
.RS
.TP
.B 0
means that no space should be printed between the symbol and the
value.
.TP
.B 1
means that a space should be printed between the symbol and the
value. 
.TP
.B 2 
means that a space should be printed between the symbol and the
sign string, if adjacent.
.RE
.TP
.I n_cs_precedes
.RS
.TP
.B 0 
- the symbol succeeds the value.
.TP
.B 1
- the symbol precedes the value.
.RE
.TP
.I n_sep_by_space
An integer set to 
.B 0
if no space separates the
.I currency_symbol
or 
.I int_curr_symbol
from the value for a negative monetary quantity, set to
.B 1
if a space separates the symbol from the value and set to
.B 2
if a space separates the symbol and the sign string, if adjacent.
.TP
.I p_sign_posn
.RS
.TP
.B 0
Parentheses enclose the quantity and the 
.I currency_symbol
or
.I int_curr_symbol.
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
.I int_curr_symbol.
.RE
.TP
.I n_sign_posn
.RS
.TP
.B 0
Parentheses enclose the quantity and the 
.I currency_symbol
or
.I int_curr_symbol.
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
.I int_curr_symbol.
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
.I int_curr_symbol.
.RE
.PP
The 
.B LC_MONETARY
definition ends with the string 
.I END LC_MONETARY.

.SS LC_NUMERIC
The definition starts with the string
.B LC_NUMERIC
in the first column.

The following keywords are allowed:

.TP
.I decimal_point
followed by the string that will be used as the decimal delimiter
when formatting numeric quantities.
.TP
.I thousands_sep
followed by the string that will be used as a group separator
when formatting numeric quantities.
.TP
.I grouping
followed by a string that describes the formatting of numeric
quantities. 
.PP
The 
.B LC_NUMERIC
definition ends with the string 
.I END LC_NUMERIC.

.SS LC_TIME
The definition starts with the string
.B LC_TIME
in the first column.

The following keywords are allowed:

.TP
.I abday
followed by a list of abbreviated weekday names. The list starts with
Sunday or its translation.
.TP
.I day
followed by a list of weekday names. The list starts with Sunday.
.TP
.I abmon
followed by a list of abbreviated month names.
.TP
.I mon
followed by a list of month names.
.TP
.I am_pm
The appropriate representation of the
.B am
and 
.B pm
strings.
.TP
.I d_t_fmt
The appropriate date and time format.
.TP
.I d_fmt
The appropriate date format.
.TP
.I t_fmt
The appropriate time format.
.TP
.I t_fmt_ampm
The appropriate time format when using 12h clock format.
.PP
The 
.B LC_TIME
definition ends with the string 
.I END LC_TIME.

.SS LC_MESSAGES
The definition starts with the string
.B LC_MESSAGES
in the first column.

The following keywords are allowed:

.TP
.I yesexpr
followed by a regular expression that describes possible
yes-responses. 
.TP
.I noexpr
followed by a regular expression that describes possible
no-responses. 

.PP
The 
.B LC_MESSAGES
definition ends with the string 
.I END LC_MESSAGES.

See the POSIX.2 standard for details.
.SH FILES
/usr/lib/locale/
\- database for the current locale setting of that category
.br
/usr/lib/nls/charmap/* \- charmap-files
.SH BUGS
The manpage isn't complete.
.\" .SH AUTHOR
.\" Jochen Hein (Hein@Student.TU-Clausthal.de)
.SH "CONFORMING TO"
POSIX.2
.SH "SEE ALSO"
.BR locale (1),
.BR localedef (1),
.BR localeconv (3),
.BR setlocale (3),
.BR charmap (5)