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
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
|
.\" 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)
.\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz)
.\"
.\" 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.
.\"
.\" 2008-06-17 Petr Baudis <pasky@suse.cz>
.\" LC_TIME: Describe first_weekday and first_workday
.\"
.TH LOCALE 5 2008-06-17 "Linux" "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.
.SS 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 (\\).
.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.
.\" FIXME glibc 2.2.2 added new nonstandard locale categories:
.\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
.\" LC_PAPER, LC_TELEPHONE. These need to be documented.
.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
through
.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
through
.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
through
.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
through
.BR 9 ,
.B a
through
.BR f ,
.B A
through
.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
.IR "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
.BR forward ,
.BR backward ,
or
.BR position .
The order definition consists of lines that describe the order
and is terminated with the keyword
.TP
.IR order_end .
.PP
For more details see the sources in
.I /usr/lib/nls/src
notably the examples
.BR POSIX ,
.B Example
and
.B Example2
.PP
The
.B LC_COLLATE
definition ends with the string
.IR "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
.BR int_curr_symbol .
.TP
.I frac_digits
followed by the number of fractional digits that should be used when
formatting with the
.BR 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
.IR int_curr_symbol .
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
.IR int_curr_symbol .
.RE
.TP
.I n_sign_posn
.RS
.TP
.B 0
Parentheses enclose the quantity and the
.I currency_symbol
or
.IR int_curr_symbol .
.TP
.B 1
The sign string precedes the quantity and the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 2
The sign string succeeds the quantity and the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 3
The sign string precedes the
.I currency_symbol
or the
.IR int_curr_symbol .
.TP
.B 4
The sign string succeeds the
.I currency_symbol
or the
.IR int_curr_symbol .
.RE
.PP
The
.B LC_MONETARY
definition ends with the string
.IR "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
.IR "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 the first day of the week
as specified by
.I week
(Sunday by default).
.TP
.I day
followed by a list of weekday names.
The list starts with the first day of the week
as specified by
.I week
(Sunday by default).
.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.
.TP
.I week
followed by a list of three values:
The number of days in a week (by default 7),
a date of beginning of the week (by default corresponds to Sunday),
and the minimal length of the first week in year (by default 4).
Regarding the start of the week,
.B 19971130
shall be used for Sunday and
.B 19971201
shall be used for Monday.
Thus, countries using
.B 19971130
should have local Sunday name as the first day in the
.I day
list,
while countries using
.B 19971201
should have Monday translation as the first item in the
.I day
list.
.TP
.IR first_weekday " (since glibc 2.2)"
Number of the first day from the
.I day
list to be shown in calendar applications.
The default value of
.B 1
corresponds to either Sunday or Monday depending
on the value of the second
.I week
list item.
.TP
.IR first_workday " (since glibc 2.2)"
Number of the first working day from the
.I day
list.
.PP
The
.B LC_TIME
definition ends with the string
.IR "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
.IR "END LC_MESSAGES" .
See the POSIX.2 standard for details.
.SH FILES
/usr/lib/locale/
\(em database for the current locale setting of that category
.br
/usr/lib/nls/charmap/* \(em charmap-files
.SH CONFORMING TO
POSIX.2, ISO/IEC 14652.
.SH BUGS
This manual page isn't complete.
.\" .SH AUTHOR
.\" Jochen Hein (Hein@Student.TU-Clausthal.de)
.SH SEE ALSO
.BR locale (1),
.BR localedef (1),
.BR localeconv (3),
.BR setlocale (3),
.BR charmap (5)
|