]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/locale.5
execve.2, get_robust_list.2, getunwind.2, pipe.2, quotactl.2, clock_getcpuclockid...
[thirdparty/man-pages.git] / man5 / locale.5
CommitLineData
fea681da 1.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de)
33af8501 2.\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz)
fea681da 3.\"
f0008367 4.\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
fea681da
MK
5.\" This program is free software; you can redistribute it and/or modify
6.\" it under the terms of the GNU General Public License as published by
7.\" the Free Software Foundation; either version 2 of the License, or
8.\" (at your option) any later version.
9.\"
10.\" This program is distributed in the hope that it will be useful,
11.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13.\" GNU General Public License for more details.
14.\"
c715f741
MK
15.\" You should have received a copy of the GNU General Public
16.\" License along with this manual; if not, see
17.\" <http://www.gnu.org/licenses/>.
8ff7380d 18.\" %%%LICENSE_END
fea681da 19.\"
33af8501
MK
20.\" 2008-06-17 Petr Baudis <pasky@suse.cz>
21.\" LC_TIME: Describe first_weekday and first_workday
22.\"
23.TH LOCALE 5 2008-06-17 "Linux" "Linux User Manual"
fea681da 24.SH NAME
f68512e9 25locale \- describes a locale definition file
fea681da 26.SH DESCRIPTION
c13182ef 27The
fea681da
MK
28.B locale
29definition files contains all the information that the
c13182ef 30.BR localedef (1)
fea681da
MK
31command needs to convert it into the binary locale database.
32
33The definition files consist of sections which each describe a
34locale category in detail.
23618627 35.SS Syntax
fea681da
MK
36The locale definition file starts with a header that may consist
37of the following keywords:
38.TP
39.I <escape_char>
40is followed by a character that should be used as the
41escape-character for the rest of the file to mark characters that
c13182ef 42should be interpreted in a special way.
74d32233 43It defaults to the backslash (\\).
fea681da
MK
44.TP
45.I <comment_char>
46is followed by a character that will be used as the
c13182ef 47comment-character for the rest of the file.
74d32233 48It defaults to the number sign (#).
fea681da
MK
49.PP
50The locale definition has one part for each locale category.
51Each part can be copied from another existing locale or
c13182ef
MK
52can be defined from scratch.
53If the category should be copied,
fea681da
MK
54the only valid keyword in the definition is
55.B copy
56followed by the name of the locale which should be copied.
c8f2dd47 57.\" FIXME glibc 2.2.2 added new nonstandard locale categories:
b32d8767
MK
58.\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
59.\" LC_PAPER, LC_TELEPHONE. These need to be documented.
fea681da 60.SS LC_CTYPE
c13182ef 61The definition for the
fea681da 62.B LC_CTYPE
c13182ef
MK
63category starts with the string
64.I LC_CTYPE
fea681da
MK
65in the first column.
66
67There are the following keywords allowed:
fea681da
MK
68.TP
69.I upper
c13182ef
MK
70followed by a list of uppercase letters.
71The letters
fea681da 72.B A
b30df7b1 73through
fea681da 74.B Z
c13182ef
MK
75are included automatically.
76Characters also specified as
fea681da
MK
77.BR cntrl ,
78.BR digit ,
79.BR punct ,
80or
81.B space
82are not allowed.
fea681da
MK
83.TP
84.I lower
c13182ef
MK
85followed by a list of lowercase letters.
86The letters
fea681da 87.B a
b878f418 88through
fea681da 89.B z
c13182ef
MK
90are included automatically.
91Characters also specified as
fea681da
MK
92.BR cntrl ,
93.BR digit ,
94.BR punct ,
95or
96.B space
97are not allowed.
fea681da
MK
98.TP
99.I alpha
c13182ef
MK
100followed by a list of letters.
101All character specified as either
fea681da 102.B upper
c13182ef 103or
fea681da 104.B lower
c13182ef
MK
105are automatically included.
106Characters also specified as
fea681da
MK
107.BR cntrl ,
108.BR digit ,
109.BR punct ,
110or
111.B space
112are not allowed.
fea681da
MK
113.TP
114.I digit
c13182ef
MK
115followed by the characters classified as numeric digits.
116Only the
117digits
118.B 0
b878f418 119through
c13182ef
MK
120.B 9
121are allowed.
122They are included by default in this class.
fea681da
MK
123.TP
124.I space
125followed by a list of characters defined as white-space
c13182ef
MK
126characters.
127Characters also specified as
fea681da
MK
128.BR upper ,
129.BR lower ,
130.BR alpha ,
131.BR digit ,
132.BR graph ,
133or
134.B xdigit
c13182ef
MK
135are not allowed.
136The characters
fea681da
MK
137.BR <space> ,
138.BR <form-feed> ,
139.BR <newline> ,
140.BR <carriage-return> ,
141.BR <tab> ,
142and
143.B <vertical-tab>
144are automatically included.
fea681da
MK
145.TP
146.I cntrl
147followed by a list of control characters.
148Characters also specified as
149.BR upper ,
150.BR lower ,
151.BR alpha ,
152.BR digit ,
153.BR punct ,
154.BR graph ,
155.BR print ,
156or
157.B xdigit
158are not allowed.
159.TP
160.I punct
c13182ef
MK
161followed by a list of punctuation characters.
162Characters also
fea681da
MK
163specified as
164.BR upper ,
165.BR lower ,
166.BR alpha ,
167.BR digit ,
168.BR cntrl ,
169.BR xdigit ,
170or the
171.B <space>
172character are not allowed.
fea681da
MK
173.TP
174.I graph
175followed by a list of printable characters, not including the
176.B <space>
c13182ef
MK
177character.
178The characters defined as
fea681da
MK
179.BR upper ,
180.BR lower ,
181.BR alpha ,
182.BR digit ,
183.BR xdigit ,
184and
c13182ef 185.B punct
fea681da
MK
186are automatically included.
187Characters also specified as
188.B cntrl
189are not allowed.
fea681da
MK
190.TP
191.I print
192followed by a list of printable characters, including the
193.B <space>
c13182ef
MK
194character.
195The characters defined as
fea681da
MK
196.BR upper ,
197.BR lower ,
198.BR alpha ,
199.BR digit ,
200.BR xdigit ,
201.BR punct ,
202and the
203.B <space>
204character are automatically included.
205Characters also specified as
206.B cntrl
207are not allowed.
fea681da
MK
208.TP
209.I xdigit
210followed by a list of characters classified as hexadecimal
c13182ef
MK
211digits.
212The decimal digits must be included followed by one or
213more set of six characters in ascending order.
214The following
fea681da
MK
215characters are included by default:
216.B 0
b878f418 217through
fea681da
MK
218.BR 9 ,
219.B a
b878f418 220through
fea681da
MK
221.BR f ,
222.B A
b878f418 223through
fea681da 224.BR F .
fea681da
MK
225.TP
226.I blank
c13182ef 227followed by a list of characters classified as
fea681da
MK
228.BR blank .
229The characters
230.B <space>
c13182ef 231and
fea681da
MK
232.B <tab>
233are automatically included.
fea681da
MK
234.TP
235.I toupper
236followed by a list of mappings from lowercase to uppercase
c13182ef
MK
237letters.
238Each mapping is a pair of a lowercase and an uppercase letter
239separated with a
fea681da 240.B ,
c13182ef
MK
241and enclosed in parentheses.
242The members of the list are separated
fea681da
MK
243with semicolons.
244.TP
245.I tolower
246followed by a list of mappings from uppercase to lowercase
c13182ef
MK
247letters.
248If the keyword tolower is not present, the reverse of the
fea681da 249toupper list is used.
fea681da 250.PP
c13182ef 251The
fea681da 252.B LC_CTYPE
c13182ef 253definition ends with the string
74d32233 254.IR "END LC_CYTPE" .
fea681da 255.SS LC_COLLATE
c13182ef
MK
256The
257.B LC_COLLATE
258category defines the rules for collating characters.
259Due to
fea681da
MK
260limitations of libc not all POSIX-options are implemented.
261
262The definition starts with the string
263.B LC_COLLATE
264in the first column.
265
266There are the following keywords allowed:
fea681da
MK
267.TP
268.I collating-element
fea681da
MK
269.TP
270.I collating-symbol
fea681da
MK
271.PP
272The order-definition starts with a line:
273.TP
274.I order_start
275.PP
276followed by a list of keywords out of
a5e0a0e4
MK
277.BR forward ,
278.BR backward ,
fea681da 279or
a5e0a0e4 280.BR position .
fea681da
MK
281The order definition consists of lines that describe the order
282and is terminated with the keyword
283.TP
a5e0a0e4 284.IR order_end .
fea681da 285.PP
c13182ef 286For more details see the sources in
8478ee02 287.I /usr/lib/nls/src
fea681da 288notably the examples
a5e0a0e4 289.BR POSIX ,
fea681da 290.B Example
c13182ef 291and
fea681da 292.B Example2
fea681da 293.PP
c13182ef 294The
fea681da 295.B LC_COLLATE
c13182ef 296definition ends with the string
74d32233 297.IR "END LC_COLLATE" .
fea681da
MK
298.SS LC_MONETARY
299The definition starts with the string
300.B LC_MONETARY
301in the first column.
302
303There are the following keywords allowed:
fea681da
MK
304.TP
305.I int_curr_symbol
c13182ef
MK
306followed by the international currency symbol.
307This must be a
fea681da
MK
3084-character string containing the international currency symbol as
309defined by the ISO 4217 standard (three characters) followed by a
310separator.
311.TP
312.I currency_symbol
313followed by the local currency symbol.
314.TP
315.I mon_decimal_point
316followed by the string that will be used as the decimal delimiter
317when formatting monetary quantities.
318.TP
319.I mon_thousands_sep
320followed by the string that will be used as a group separator
321when formatting monetary quantities.
322.TP
323.I mon_grouping
324followed by a string that describes the formatting of numeric
c13182ef 325quantities.
fea681da
MK
326.TP
327.I positive_sign
328followed by a string that is used to indicate a positive sign for
329monetary quantities.
330.TP
331.I negative_sign
332followed by a string that is used to indicate a negative sign for
333monetary quantities.
334.TP
335.I int_frac_digits
336followed by the number of fractional digits that should be used when
c13182ef 337formatting with the
a5e0a0e4 338.BR int_curr_symbol .
fea681da
MK
339.TP
340.I frac_digits
341followed by the number of fractional digits that should be used when
c13182ef 342formatting with the
a5e0a0e4 343.BR currency_symbol .
fea681da
MK
344.TP
345.I p_cs_precedes
c13182ef
MK
346followed by an integer set to
347.B 1
fea681da
MK
348if the
349.I currency_symbol
350or
351.I int_curr_symbol
6beb1671 352should precede the formatted monetary quantity or set to
fea681da
MK
353.B 0
354if the symbol succeeds the value.
355.TP
356.I p_sep_by_space
357followed by an integer.
358.RS
359.TP
360.B 0
361means that no space should be printed between the symbol and the
362value.
363.TP
364.B 1
365means that a space should be printed between the symbol and the
c13182ef 366value.
fea681da 367.TP
c13182ef 368.B 2
fea681da
MK
369means that a space should be printed between the symbol and the
370sign string, if adjacent.
371.RE
372.TP
373.I n_cs_precedes
374.RS
375.TP
c13182ef 376.B 0
fea681da
MK
377- the symbol succeeds the value.
378.TP
379.B 1
380- the symbol precedes the value.
381.RE
382.TP
383.I n_sep_by_space
c13182ef 384An integer set to
fea681da
MK
385.B 0
386if no space separates the
387.I currency_symbol
c13182ef 388or
fea681da
MK
389.I int_curr_symbol
390from the value for a negative monetary quantity, set to
391.B 1
392if a space separates the symbol from the value and set to
393.B 2
394if a space separates the symbol and the sign string, if adjacent.
395.TP
396.I p_sign_posn
397.RS
398.TP
399.B 0
c13182ef 400Parentheses enclose the quantity and the
fea681da
MK
401.I currency_symbol
402or
a5e0a0e4 403.IR int_curr_symbol .
fea681da
MK
404.TP
405.B 1
406The sign string precedes the quantity and the
407.I currency_symbol
408or the
a5e0a0e4 409.IR int_curr_symbol .
fea681da
MK
410.TP
411.B 2
412The sign string succeeds the quantity and the
413.I currency_symbol
414or the
a5e0a0e4 415.IR int_curr_symbol .
fea681da
MK
416.TP
417.B 3
418The sign string precedes the
419.I currency_symbol
420or the
a5e0a0e4 421.IR int_curr_symbol .
fea681da
MK
422.TP
423.B 4
424The sign string succeeds the
425.I currency_symbol
426or the
a5e0a0e4 427.IR int_curr_symbol .
fea681da
MK
428.RE
429.TP
430.I n_sign_posn
431.RS
432.TP
433.B 0
c13182ef 434Parentheses enclose the quantity and the
fea681da
MK
435.I currency_symbol
436or
a5e0a0e4 437.IR int_curr_symbol .
fea681da
MK
438.TP
439.B 1
440The sign string precedes the quantity and the
441.I currency_symbol
442or the
a5e0a0e4 443.IR int_curr_symbol .
fea681da
MK
444.TP
445.B 2
446The sign string succeeds the quantity and the
447.I currency_symbol
448or the
a5e0a0e4 449.IR int_curr_symbol .
fea681da
MK
450.TP
451.B 3
452The sign string precedes the
453.I currency_symbol
454or the
a5e0a0e4 455.IR int_curr_symbol .
fea681da
MK
456.TP
457.B 4
458The sign string succeeds the
459.I currency_symbol
460or the
a5e0a0e4 461.IR int_curr_symbol .
fea681da
MK
462.RE
463.PP
c13182ef 464The
fea681da 465.B LC_MONETARY
c13182ef 466definition ends with the string
74d32233 467.IR "END LC_MONETARY" .
fea681da
MK
468.SS LC_NUMERIC
469The definition starts with the string
470.B LC_NUMERIC
471in the first column.
472
473The following keywords are allowed:
fea681da
MK
474.TP
475.I decimal_point
476followed by the string that will be used as the decimal delimiter
477when formatting numeric quantities.
478.TP
479.I thousands_sep
480followed by the string that will be used as a group separator
481when formatting numeric quantities.
482.TP
483.I grouping
484followed by a string that describes the formatting of numeric
c13182ef 485quantities.
fea681da 486.PP
c13182ef 487The
fea681da 488.B LC_NUMERIC
c13182ef 489definition ends with the string
74d32233 490.IR "END LC_NUMERIC" .
fea681da
MK
491.SS LC_TIME
492The definition starts with the string
493.B LC_TIME
494in the first column.
495
496The following keywords are allowed:
fea681da
MK
497.TP
498.I abday
b458e1bf 499followed by a list of abbreviated names of the days of the week.
33af8501
MK
500The list starts with the first day of the week
501as specified by
502.I week
503(Sunday by default).
fea681da
MK
504.TP
505.I day
b458e1bf 506followed by a list of names of the days of the week.
33af8501
MK
507The list starts with the first day of the week
508as specified by
509.I week
510(Sunday by default).
fea681da
MK
511.TP
512.I abmon
513followed by a list of abbreviated month names.
514.TP
515.I mon
516followed by a list of month names.
517.TP
518.I am_pm
519The appropriate representation of the
520.B am
c13182ef 521and
fea681da
MK
522.B pm
523strings.
524.TP
525.I d_t_fmt
526The appropriate date and time format.
527.TP
528.I d_fmt
529The appropriate date format.
530.TP
531.I t_fmt
532The appropriate time format.
533.TP
534.I t_fmt_ampm
535The appropriate time format when using 12h clock format.
33af8501
MK
536.TP
537.I week
538followed by a list of three values:
539The number of days in a week (by default 7),
540a date of beginning of the week (by default corresponds to Sunday),
541and the minimal length of the first week in year (by default 4).
542Regarding the start of the week,
543.B 19971130
544shall be used for Sunday and
545.B 19971201
67da5267
MK
546shall be used for Monday.
547Thus, countries using
33af8501
MK
548.B 19971130
549should have local Sunday name as the first day in the
550.I day
551list,
552while countries using
553.B 19971201
1bb54c6c 554should have Monday translation as the first item in the
33af8501
MK
555.I day
556list.
557.TP
558.IR first_weekday " (since glibc 2.2)"
559Number of the first day from the
560.I day
561list to be shown in calendar applications.
562The default value of
563.B 1
564corresponds to either Sunday or Monday depending
565on the value of the second
566.I week
567list item.
568.TP
569.IR first_workday " (since glibc 2.2)"
570Number of the first working day from the
571.I day
572list.
fea681da 573.PP
c13182ef 574The
fea681da 575.B LC_TIME
c13182ef 576definition ends with the string
74d32233 577.IR "END LC_TIME" .
fea681da
MK
578.SS LC_MESSAGES
579The definition starts with the string
580.B LC_MESSAGES
581in the first column.
582
583The following keywords are allowed:
fea681da
MK
584.TP
585.I yesexpr
586followed by a regular expression that describes possible
c13182ef 587yes-responses.
fea681da
MK
588.TP
589.I noexpr
590followed by a regular expression that describes possible
c13182ef 591no-responses.
fea681da 592.PP
c13182ef 593The
fea681da 594.B LC_MESSAGES
c13182ef 595definition ends with the string
74d32233 596.IR "END LC_MESSAGES" .
fea681da
MK
597
598See the POSIX.2 standard for details.
599.SH FILES
600/usr/lib/locale/
df8a3cac 601\(em database for the current locale setting of that category
fea681da 602.br
df8a3cac 603/usr/lib/nls/charmap/* \(em charmap-files
47297adb 604.SH CONFORMING TO
44a2c328 605POSIX.2, ISO/IEC 14652.
fea681da 606.SH BUGS
23618627 607This manual page isn't complete.
fea681da
MK
608.\" .SH AUTHOR
609.\" Jochen Hein (Hein@Student.TU-Clausthal.de)
47297adb 610.SH SEE ALSO
fea681da
MK
611.BR locale (1),
612.BR localedef (1),
613.BR localeconv (3),
614.BR setlocale (3),
615.BR charmap (5)