]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/locale.5
locale.7: Minor tweaks
[thirdparty/man-pages.git] / man5 / locale.5
CommitLineData
f809007b 1'\" t -*- coding: UTF-8 -*-
fea681da 2.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de)
33af8501 3.\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz)
ca56bbbc 4.\" Copyright (C) 2014 Michael Kerrisk <mtk@manpages@gmail.com>
fea681da 5.\"
f0008367 6.\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
fea681da
MK
7.\" This program is free software; you can redistribute it and/or modify
8.\" it under the terms of the GNU General Public License as published by
9.\" the Free Software Foundation; either version 2 of the License, or
10.\" (at your option) any later version.
11.\"
12.\" This program is distributed in the hope that it will be useful,
13.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15.\" GNU General Public License for more details.
16.\"
c715f741
MK
17.\" You should have received a copy of the GNU General Public
18.\" License along with this manual; if not, see
19.\" <http://www.gnu.org/licenses/>.
8ff7380d 20.\" %%%LICENSE_END
fea681da 21.\"
33af8501
MK
22.\" 2008-06-17 Petr Baudis <pasky@suse.cz>
23.\" LC_TIME: Describe first_weekday and first_workday
24.\"
8392a3b3 25.TH LOCALE 5 2015-01-22 "Linux" "Linux User Manual"
fea681da 26.SH NAME
f68512e9 27locale \- describes a locale definition file
fea681da 28.SH DESCRIPTION
c13182ef 29The
fea681da 30.B locale
6fae67a4 31definition file contains all the information that the
c13182ef 32.BR localedef (1)
fea681da
MK
33command needs to convert it into the binary locale database.
34
35The definition files consist of sections which each describe a
36locale category in detail.
23618627 37.SS Syntax
fea681da
MK
38The locale definition file starts with a header that may consist
39of the following keywords:
40.TP
41.I <escape_char>
42is followed by a character that should be used as the
43escape-character for the rest of the file to mark characters that
c13182ef 44should be interpreted in a special way.
74d32233 45It defaults to the backslash (\\).
fea681da
MK
46.TP
47.I <comment_char>
48is followed by a character that will be used as the
c13182ef 49comment-character for the rest of the file.
74d32233 50It defaults to the number sign (#).
fea681da
MK
51.PP
52The locale definition has one part for each locale category.
53Each part can be copied from another existing locale or
c13182ef
MK
54can be defined from scratch.
55If the category should be copied,
fea681da
MK
56the only valid keyword in the definition is
57.B copy
f809007b
MM
58followed by the name of the locale in double quotes which should be
59copied.
af7ad104
MM
60The exceptions for this rule are
61.B LC_COLLATE
62and
63.B LC_CTYPE
64where a
65.B copy
66statement can be followed by locale specific rules and selected overrides.
f809007b
MM
67.PP
68When defining a category from scratch, all field descriptors and strings
69should be defined as Unicode code points in angle brackets, unless
70otherwise stated below.
73d11aab 71For example, "€" is to be presented as "<U20AC>", "%a" as
f809007b
MM
72"<U0025><U0061>", and "Monday" as
73"<U0053><U0075><U006E><U0064><U0061><U0079>".
74Values defined as Unicode code points must be in double quotes, plain
75number values are not quoted (but
76.BR LC_CTYPE
77and
78.BR LC_COLLATE
984bf8fc 79follow special formatting, see the system-provided locale files for
f809007b 80examples).
ca56bbbc
MK
81.SS Locale category sections
82The following category sections are defined by POSIX:
83.IP * 3
84.B LC_CTYPE
85.IP *
86.B LC_COLLATE
87.IP *
8ed1a976
MK
88.B LC_MESSAGES
89.IP *
ca56bbbc
MK
90.B LC_MONETARY
91.IP *
92.B LC_NUMERIC
93.IP *
94.B LC_TIME
ca56bbbc
MK
95.PP
96In addition, since version 2.2,
97the GNU C library supports the following nonstandard categories:
98.IP * 3
99.B LC_ADDRESS
100.IP *
101.B LC_IDENTIFICATION
102.IP *
103.B LC_MEASUREMENT
104.IP *
105.B LC_NAME
106.IP *
107.B LC_PAPER
108.IP *
109.B LC_TELEPHONE
f809007b
MM
110.PP
111See
112.BR locale (7)
984bf8fc 113for a more detailed description of each category.
f809007b 114
73cb5f18 115.SS LC_ADDRESS
5f7504ef 116The definition starts with the string
73cb5f18 117.B LC_ADDRESS
73cb5f18
MK
118in the first column.
119
120The following keywords are allowed:
121.\" Thanks to the kind folk who wrote localedata/locales/uk_UA
122.TP
123.I postal_fmt
124followed by a string containing field descriptors that define
125the format used for postal addresses in the locale.
126The following field descriptors are recognized:
127.\" From localedata/locales/uk_UA:
128.RS
129.\" .TP
130.\" %n
131.\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not supported
132.\" by glibc
133.\" Person's name, possibly constructed with the
134.\" .B LC_NAME
135.\" .I name_fmt
136.\" keyword.
f809007b
MM
137.\"
138.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
73cb5f18
MK
139.TP
140%a
141Care of person, or organization.
142.TP
143%f
144Firm name.
145.TP
146%d
147Department name.
148.TP
149%b
150Building name.
151.TP
152%s
153Street or block (e.g., Japanese) name.
154.TP
155%h
156House number or designation.
157.TP
158%N
159Insert an end-of-line if the previous descriptor's value was not an empty
160string; otherwise ignore.
161.TP
162%t
163Insert a space if the previous descriptor's value was not an empty string;
164otherwise ignore.
165.TP
166%r
167Room number, door designation.
168.TP
169%e
170Floor number.
171.TP
172%C
173Country designation, from the <country_post> keyword.
174.\" .TP
175.\" %l
176.\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not
177.\" supported by glibc
178.\" Local township within town or city.
f809007b
MM
179.\"
180.\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
73cb5f18
MK
181.TP
182%z
183Zip number, postal code.
184.TP
185%T
186Town, city.
187.TP
188%S
189State, province, or prefecture.
190.TP
191%c
192Country, as taken from data record.
193.PP
194Each field descriptor may have an \(aqR\(aq after
195the \(aq%\(aq to specify that the
196information is taken from a Romanized version string of the
197entity.
198.RE
199
200.TP
201.I country_name
202followed by the country name in the language of the current document
5f7504ef 203(e.g., "Deutschland" for the
73cb5f18
MK
204.IR de_DE
205locale).
206.TP
207.I country_post
208followed by the abbreviation of the country (see CERT_MAILCODES).
209.TP
210.I country_ab2
211followed by the two-letter abbreviation of the country (ISO 3166).
212.TP
213.I country_ab3
214followed by the three-letter abbreviation of the country (ISO 3166).
215.TP
216.I country_num
f809007b 217followed by the numeric country code as plain numbers (ISO 3166).
73cb5f18
MK
218.TP
219.I country_car
220followed by the code for the country car number.
221.TP
222.I country_isbn
d8826256 223followed by the ISBN code (for books).
73cb5f18
MK
224.TP
225.I lang_name
226followed by the language name in the language of the current document.
227.TP
228.I lang_ab
229followed by the two-letter abbreviation of the language (ISO 639).
230.TP
231.I lang_term
e6812b0d 232followed by the three-letter abbreviation of the language (ISO 639-2/T).
73cb5f18
MK
233.TP
234.I lang_lib
e6812b0d 235followed by the three-letter abbreviation of the language for library
c33a8494
MK
236use (ISO 639-2/B).
237Applications should in general prefer
e6812b0d
MM
238.IR lang_term
239over
240.IR lang_lib .
73cb5f18
MK
241.PP
242The
243.B LC_ADDRESS
244definition ends with the string
245.IR "END LC_ADDRESS" .
fea681da 246.SS LC_CTYPE
5f7504ef 247The definition starts with the string
fea681da 248.B LC_CTYPE
fea681da
MK
249in the first column.
250
c85b9034 251The following keywords are allowed:
fea681da
MK
252.TP
253.I upper
c13182ef
MK
254followed by a list of uppercase letters.
255The letters
fea681da 256.B A
b30df7b1 257through
fea681da 258.B Z
c13182ef
MK
259are included automatically.
260Characters also specified as
fea681da
MK
261.BR cntrl ,
262.BR digit ,
263.BR punct ,
264or
265.B space
266are not allowed.
fea681da
MK
267.TP
268.I lower
c13182ef
MK
269followed by a list of lowercase letters.
270The letters
fea681da 271.B a
b878f418 272through
fea681da 273.B z
c13182ef
MK
274are included automatically.
275Characters also specified as
fea681da
MK
276.BR cntrl ,
277.BR digit ,
278.BR punct ,
279or
280.B space
281are not allowed.
fea681da
MK
282.TP
283.I alpha
c13182ef
MK
284followed by a list of letters.
285All character specified as either
fea681da 286.B upper
c13182ef 287or
fea681da 288.B lower
c13182ef
MK
289are automatically included.
290Characters also specified as
fea681da
MK
291.BR cntrl ,
292.BR digit ,
293.BR punct ,
294or
295.B space
296are not allowed.
fea681da
MK
297.TP
298.I digit
c13182ef
MK
299followed by the characters classified as numeric digits.
300Only the
301digits
302.B 0
b878f418 303through
c13182ef
MK
304.B 9
305are allowed.
306They are included by default in this class.
fea681da
MK
307.TP
308.I space
309followed by a list of characters defined as white-space
c13182ef
MK
310characters.
311Characters also specified as
fea681da
MK
312.BR upper ,
313.BR lower ,
314.BR alpha ,
315.BR digit ,
316.BR graph ,
317or
318.B xdigit
c13182ef
MK
319are not allowed.
320The characters
fea681da
MK
321.BR <space> ,
322.BR <form-feed> ,
323.BR <newline> ,
324.BR <carriage-return> ,
325.BR <tab> ,
326and
327.B <vertical-tab>
328are automatically included.
fea681da
MK
329.TP
330.I cntrl
331followed by a list of control characters.
332Characters also specified as
333.BR upper ,
334.BR lower ,
335.BR alpha ,
336.BR digit ,
337.BR punct ,
338.BR graph ,
339.BR print ,
340or
341.B xdigit
342are not allowed.
343.TP
344.I punct
c13182ef
MK
345followed by a list of punctuation characters.
346Characters also
fea681da
MK
347specified as
348.BR upper ,
349.BR lower ,
350.BR alpha ,
351.BR digit ,
352.BR cntrl ,
353.BR xdigit ,
354or the
355.B <space>
356character are not allowed.
fea681da
MK
357.TP
358.I graph
359followed by a list of printable characters, not including the
360.B <space>
c13182ef
MK
361character.
362The characters defined as
fea681da
MK
363.BR upper ,
364.BR lower ,
365.BR alpha ,
366.BR digit ,
367.BR xdigit ,
368and
c13182ef 369.B punct
fea681da
MK
370are automatically included.
371Characters also specified as
372.B cntrl
373are not allowed.
fea681da
MK
374.TP
375.I print
376followed by a list of printable characters, including the
377.B <space>
c13182ef
MK
378character.
379The characters defined as
fea681da
MK
380.BR upper ,
381.BR lower ,
382.BR alpha ,
383.BR digit ,
384.BR xdigit ,
385.BR punct ,
386and the
387.B <space>
388character are automatically included.
389Characters also specified as
390.B cntrl
391are not allowed.
fea681da
MK
392.TP
393.I xdigit
394followed by a list of characters classified as hexadecimal
c13182ef
MK
395digits.
396The decimal digits must be included followed by one or
397more set of six characters in ascending order.
398The following
fea681da
MK
399characters are included by default:
400.B 0
b878f418 401through
fea681da
MK
402.BR 9 ,
403.B a
b878f418 404through
fea681da
MK
405.BR f ,
406.B A
b878f418 407through
fea681da 408.BR F .
fea681da
MK
409.TP
410.I blank
c13182ef 411followed by a list of characters classified as
fea681da
MK
412.BR blank .
413The characters
414.B <space>
c13182ef 415and
fea681da
MK
416.B <tab>
417are automatically included.
fea681da
MK
418.TP
419.I toupper
420followed by a list of mappings from lowercase to uppercase
c13182ef
MK
421letters.
422Each mapping is a pair of a lowercase and an uppercase letter
423separated with a
fea681da 424.B ,
c13182ef
MK
425and enclosed in parentheses.
426The members of the list are separated
fea681da
MK
427with semicolons.
428.TP
429.I tolower
430followed by a list of mappings from uppercase to lowercase
c13182ef
MK
431letters.
432If the keyword tolower is not present, the reverse of the
fea681da 433toupper list is used.
ae91a0d6 434.TP
f863ce4f
MM
435.I map "totitle"
436followed by a list of mapping pairs of
437characters and letters
438to be used in titles (headings).
439.TP
1f4f51b5
MM
440.I class
441followed by a locale-specific character class definition,
442starting with the class name followed by the characters
443belonging to the class.
444.TP
ae91a0d6
MM
445.I charclass
446followed by a list of locale-specific character class names
447which are then to be defined in the locale.
448.TP
449.I charconv
450followed by a list of locale-specific character map names
451which are then to be defined in the locale.
89257a53
MM
452.TP
453.I outdigit
454followed by a list of alternate output digits for the locale.
0ef30d8d
MM
455.TP
456.I map to_inpunct
457followed by a list of mapping pairs of
458alternate digits and separators
459for input digits for the locale.
460.TP
461.I map to_outpunct
462followed by a list of mapping pairs of
463alternate separators
464for output for the locale.
4e3b0c16
MM
465.TP
466.I translit_start
467marks the start of the transliteration rules section.
468The section can contain the
469.I include
470keyword in the beginning followed by
471locale specific rules and overrides.
472Any rule specified in the locale file
473will override any rule
474copied or included from other files.
475In case of duplicate rule definitions in the locale file,
476only the first rule is used.
477
478A transliteration rule consist of a character to be transliterated
479followed by a list of transliteration targets separated by semicolons.
480The first target which can be presented in the target character set
481is used, if none of them can be used the
482.I default_missing
483character will be used instead.
484.TP
485.I include
486in the transliteration rules section includes
487a transliteration rule file
488(and optionally a repertoire map file)
489.
490.TP
6077885a
MM
491.I default_missing
492in the transliteration rules section
493defines the default character to be used for
494transliteration where none of the targets cannot be presented
495in the target character set.
496.TP
4e3b0c16
MM
497.I translit_end
498marks the end of the transliteration rules.
fea681da 499.PP
c13182ef 500The
fea681da 501.B LC_CTYPE
c13182ef 502definition ends with the string
49b3d955 503.IR "END LC_CTYPE" .
fea681da 504.SS LC_COLLATE
f809007b 505Due to limitations of glibc not all POSIX-options are implemented.
fea681da
MK
506
507The definition starts with the string
508.B LC_COLLATE
509in the first column.
510
c85b9034 511The following keywords are allowed:
bea08fec
MK
512.\" FIXME The following LC_COLLATE keywords are not documented:
513.\" script
514.\" symbol-equivalence
fea681da
MK
515.TP
516.I collating-element
84f36a95
MK
517followed by the definition of a collating-element symbol
518representing a multicharacter collating element.
fea681da
MK
519.TP
520.I collating-symbol
84f36a95
MK
521followed by the definition of a collating symbol
522that can be used in collation order statements.
fea681da
MK
523.PP
524The order-definition starts with a line:
525.TP
526.I order_start
c85b9034 527followed by a list of keywords chosen from
a5e0a0e4
MK
528.BR forward ,
529.BR backward ,
fea681da 530or
a5e0a0e4 531.BR position .
fea681da
MK
532The order definition consists of lines that describe the order
533and is terminated with the keyword
a5e0a0e4 534.IR order_end .
bea08fec
MK
535.\" FIXME The following LC_COLLATE keywords are not documented:
536.\" reorder-after
537.\" reorder-end
538.\" reorder-sections-after
539.\" reorder-sections-end
fea681da 540.PP
c13182ef 541The
fea681da 542.B LC_COLLATE
c13182ef 543definition ends with the string
74d32233 544.IR "END LC_COLLATE" .
25e04747 545.SS LC_IDENTIFICATION
25e04747
MK
546The definition starts with the string
547.B LC_IDENTIFICATION
548in the first column.
549
f809007b
MM
550The values in this category are defined as plain strings.
551
25e04747
MK
552The following keywords are allowed:
553.TP
554.I title
5f7504ef 555followed by the title of the locale document
25e04747
MK
556(e.g., "Maori language locale for New Zealand").
557.TP
558.I source
559followed by the name of the organization that maintains this document.
560.TP
561.I address
562followed by the address of the organization that maintains this document.
563.TP
564.I contact
565followed by the name of the contact person at
566the organization that maintains this document.
567.TP
568.I email
e9f22b0a 569followed by the email address of the person or
25e04747
MK
570organization that maintains this document.
571.TP
572.I tel
573followed by the telephone number (in international format)
574of the organization that maintains this document.
575.TP
576.I fax
5f7504ef 577followed by the fax number (in international format)
25e04747
MK
578of the organization that maintains this document.
579.TP
580.I language
581followed by the name of the language to which this document applies.
582.TP
583.I territory
584followed by the name of the country/geographic extent
585to which this document applies.
586.TP
587.I audience
588followed by a description of the audience for which this document is intended.
589.TP
590.I application
591followed by a description of any special application
592for which this document is intended.
593.TP
594.I abbreviation
595.\" as far as I can tell... (mtk)
596followed by the short name for this document.
597.TP
598.I revision
599followed by the revision number of this document.
600.TP
601.I date
602followed by the revision date of this document.
603.PP
604In addition, for each of the categories defined by the document,
605there should be a line starting with the keyword
606.IR category ,
607followed by:
608.IP * 3
609a string that identifies this locale category definition,
610.IP *
611a semicolon, and
612.IP *
613one of the
5f7504ef 614.BI LC_ *
25e04747
MK
615identifiers.
616.PP
617The
618.B LC_IDENTIFICATION
619definition ends with the string
620.IR "END LC_IDENTIFICATION" .
8ed1a976
MK
621.SS LC_MESSAGES
622The definition starts with the string
623.B LC_MESSAGES
624in the first column.
625
626The following keywords are allowed:
627.TP
628.I yesexpr
629followed by a regular expression that describes possible
630yes-responses.
631.TP
632.I noexpr
633followed by a regular expression that describes possible
634no-responses.
12320325
MK
635.TP
636.I yesstr
637followed by the output string corresponding to "yes".
638.TP
639.I nostr
640followed by the output string corresponding to "no".
8ed1a976
MK
641.PP
642The
643.B LC_MESSAGES
644definition ends with the string
645.IR "END LC_MESSAGES" .
586370d8
MK
646.SS LC_MEASUREMENT
647The definition starts with the string
648.B LC_MEASUREMENT
649in the first column.
650
651The following keywords are allowed:
652.TP
653.I measurement
5f7504ef 654followed by number identifying the standard used for measurement.
586370d8
MK
655The following values are recognized:
656.RS
657.TP
658.B 1
659Metric.
660.TP
661.B 2
662US customary measurements.
663.RE
664.PP
665The
666.B LC_MEASUREMENT
667definition ends with the string
668.IR "END LC_MEASUREMENT" .
fea681da
MK
669.SS LC_MONETARY
670The definition starts with the string
671.B LC_MONETARY
672in the first column.
673
f809007b
MM
674Values for
675.IR int_curr_symbol ,
676.IR currency_symbol ,
677.IR mon_decimal_point ,
678.IR mon_thousands_sep ,
679.IR positive_sign ,
680and
681.IR negative_sign
682are defined as Unicode code points, the others as plain numbers.
683
ce48c070 684The following keywords are allowed:
fea681da
MK
685.TP
686.I int_curr_symbol
c13182ef
MK
687followed by the international currency symbol.
688This must be a
fea681da
MK
6894-character string containing the international currency symbol as
690defined by the ISO 4217 standard (three characters) followed by a
691separator.
692.TP
693.I currency_symbol
694followed by the local currency symbol.
695.TP
696.I mon_decimal_point
697followed by the string that will be used as the decimal delimiter
698when formatting monetary quantities.
699.TP
700.I mon_thousands_sep
701followed by the string that will be used as a group separator
702when formatting monetary quantities.
703.TP
704.I mon_grouping
6699fab5 705followed by a sequence of integers separated by semicolons that
244b504c
MK
706describe the formatting of monetary quantities.
707See
6699fab5
MM
708.I grouping
709below for details.
fea681da
MK
710.TP
711.I positive_sign
712followed by a string that is used to indicate a positive sign for
713monetary quantities.
714.TP
715.I negative_sign
716followed by a string that is used to indicate a negative sign for
717monetary quantities.
718.TP
719.I int_frac_digits
720followed by the number of fractional digits that should be used when
c13182ef 721formatting with the
aef9ea90 722.IR int_curr_symbol .
fea681da
MK
723.TP
724.I frac_digits
725followed by the number of fractional digits that should be used when
c13182ef 726formatting with the
aef9ea90 727.IR currency_symbol .
fea681da
MK
728.TP
729.I p_cs_precedes
8afc6598 730followed by an integer that indicates the placement of
fea681da 731.I currency_symbol
8afc6598
MK
732for a nonnegative formatted monetary quantity:
733.RS
734.TP
fea681da 735.B 0
8afc6598
MK
736the symbol succeeds the value.
737.TP
738.B 1
739the symbol precedes the value.
740.RE
741.TP
742.I n_cs_precedes
743followed by an integer that indicates the placement of
744.I currency_symbol
745for a negative formatted monetary quantity.
746The same values are recognized as for
747.IR p_cs_precedes .
fea681da 748.TP
c9e3729b
MK
749.I int_p_cs_precedes
750followed by an integer that indicates the placement of
751.I int_currency_symbol
752for a nonnegative internationally formatted monetary quantity.
753The same values are recognized as for
754.IR p_cs_precedes .
755.TP
756.I int_n_cs_precedes
757followed by an integer that indicates the placement of
758.I int_currency_symbol
759for a negative internationally formatted monetary quantity.
760The same values are recognized as for
761.IR p_cs_precedes .
762.TP
fea681da 763.I p_sep_by_space
df31d6a5
MK
764followed by an integer that indicates the separation of
765.IR currency_symbol ,
766the sign string, and the value for a nonnegative formatted monetary quantity.
767The following values are recognized:
fea681da
MK
768.RS
769.TP
770.B 0
df31d6a5 771No space separates the currency symbol and the value.
fea681da
MK
772.TP
773.B 1
df31d6a5
MK
774If the currency symbol and the sign string are adjacent,
775a space separates them from the value;
776otherwise a space separates the currency symbol and the value.
fea681da 777.TP
c13182ef 778.B 2
df31d6a5
MK
779If the currency symbol and the sign string are adjacent,
780a space separates them from the value;
781otherwise a space separates the sign string and the value.
fea681da
MK
782.RE
783.TP
fea681da 784.I n_sep_by_space
d2a92628
MK
785followed by an integer that indicates the separation of
786.IR currency_symbol ,
49b3d955 787the sign string, and the value for a negative formatted monetary quantity.
d2a92628
MK
788The same values are recognized as for
789.IR p_sep_by_space .
fea681da 790.TP
923b0843
MK
791.I int_p_sep_by_space
792followed by an integer that indicates the separation of
793.IR int_currency_symbol ,
794the sign string,
795and the value for a nonnegative internationally formatted monetary quantity.
796The same values are recognized as for
797.IR p_sep_by_space .
798.TP
799.I int_n_sep_by_space
800followed by an integer that indicates the separation of
801.IR int_currency_symbol ,
802the sign string,
803and the value for a negative internationally formatted monetary quantity.
804The same values are recognized as for
805.IR p_sep_by_space .
806.TP
fea681da 807.I p_sign_posn
0a5c57f9
MK
808followed by an integer that indicates where the
809.I positive_sign
810should be placed for a nonnegative monetary quantity:
fea681da
MK
811.RS
812.TP
813.B 0
c13182ef 814Parentheses enclose the quantity and the
fea681da
MK
815.I currency_symbol
816or
a5e0a0e4 817.IR int_curr_symbol .
fea681da
MK
818.TP
819.B 1
820The sign string precedes the quantity and the
821.I currency_symbol
822or the
a5e0a0e4 823.IR int_curr_symbol .
fea681da
MK
824.TP
825.B 2
826The sign string succeeds the quantity and the
827.I currency_symbol
828or the
a5e0a0e4 829.IR int_curr_symbol .
fea681da
MK
830.TP
831.B 3
832The sign string precedes the
833.I currency_symbol
834or the
a5e0a0e4 835.IR int_curr_symbol .
fea681da
MK
836.TP
837.B 4
838The sign string succeeds the
839.I currency_symbol
840or the
a5e0a0e4 841.IR int_curr_symbol .
fea681da
MK
842.RE
843.TP
844.I n_sign_posn
0a5c57f9
MK
845followed by an integer that indicates where the
846.I negative_sign
847should be placed for a negative monetary quantity.
548fe9a5
MK
848The same values are recognized as for
849.IR p_sign_posn .
850.TP
851.I int_p_sign_posn
852followed by an integer that indicates where the
6ba56b5c 853.I positive_sign
548fe9a5
MK
854should be placed for a nonnegative
855internationally formatted monetary quantity.
856The same values are recognized as for
857.IR p_sign_posn .
858.TP
859.I int_n_sign_posn
860followed by an integer that indicates where the
861.I negative_sign
862should be placed for a negative
863internationally formatted monetary quantity.
864The same values are recognized as for
0a5c57f9 865.IR p_sign_posn .
fea681da 866.PP
c13182ef 867The
fea681da 868.B LC_MONETARY
c13182ef 869definition ends with the string
74d32233 870.IR "END LC_MONETARY" .
929e0bf7
MK
871.SS LC_NAME
872The definition starts with the string
873.B LC_NAME
874in the first column.
875
c33a8494 876Various keywords are allowed, but only
b5d4168a 877.IR name_fmt
c33a8494 878is mandatory.
ee2d3ed6 879Other keywords are needed only if there is common convention to
c33a8494
MK
880use the corresponding salutation in this locale.
881The allowed keywords are as follows:
929e0bf7
MK
882.TP
883.I name_fmt
884followed by a string containing field descriptors that define
885the format used for names in the locale.
886The following field descriptors are recognized:
887.\" From localedata/locales/uk_UA:
888.RS
889.TP
890%f
891Family name(s).
892.TP
893%F
894Family names in uppercase.
895.TP
896%g
897First given name.
898.TP
899%G
900First given initial.
901.TP
902%l
903First given name with Latin letters.
904.TP
905%o
906Other shorter name.
907.TP
908%m
909Additional given name(s).
910.TP
911%M
912Initials for additional given name(s).
913.TP
914%p
915Profession.
916.TP
917%s
918Salutation, such as "Doctor".
919.TP
920%S
921Abbreviated salutation, such as "Mr." or "Dr.".
922.TP
923%d
924Salutation, using the FDCC-sets conventions.
925.\" 1 for the name_gen
926.\" In glibc 2.19, %d1 is used in only:
927.\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
928.\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
929.\" In glibc 2.19, %d[2-5] appear to be not used at all
930.\" 2 for name_mr
931.\" 3 for name_mrs
932.\" 4 for name_miss
933.\" 5 for name_ms
934.TP
935%t
936If the preceding field descriptor resulted in an empty string,
937then the empty string, otherwise a space character.
938.RE
939.TP
940.I name_gen
941followed by the general salutation for any gender.
942.TP
943.I name_mr
944followed by the salutation for men.
945.TP
946.I name_mrs
947followed by the salutation for married women.
948.TP
949.I name_miss
950followed by the salutation for unmarried women.
951.TP
952.I name_ms
953followed by the salutation valid for all women.
954.PP
955The
956.B LC_NAME
957definition ends with the string
958.IR "END LC_NAME" .
fea681da
MK
959.SS LC_NUMERIC
960The definition starts with the string
961.B LC_NUMERIC
962in the first column.
963
964The following keywords are allowed:
fea681da
MK
965.TP
966.I decimal_point
967followed by the string that will be used as the decimal delimiter
968when formatting numeric quantities.
969.TP
970.I thousands_sep
971followed by the string that will be used as a group separator
972when formatting numeric quantities.
973.TP
974.I grouping
360d3116 975followed by a sequence of integers as plain numbers separated by
f809007b 976semicolons that describe the formatting of numeric quantities.
244b504c
MK
977.IP
978Each integer specifies the number of digits in a group.
979The first integer defines the size of the group immediately
980to the left of the decimal delimiter.
981Subsequent integers define succeeding groups to the
982left of the previous group.
983If the last integer is not \-1, then the size of the previous group
984(if any) is repeatedly used for the remainder of the digits.
985If the last integer is \-1, then no further grouping is performed.
fea681da 986.PP
c13182ef 987The
fea681da 988.B LC_NUMERIC
c13182ef 989definition ends with the string
74d32233 990.IR "END LC_NUMERIC" .
54095c2c
MK
991.SS LC_PAPER
992The definition starts with the string
993.B LC_PAPER
994in the first column.
995
f809007b
MM
996Values in this category are defined as plain numbers.
997
54095c2c
MK
998The following keywords are allowed:
999.TP
1000.I height
1001followed by the height, in millimeters, of the standard paper format.
1002.TP
1003.I width
1004followed by the width, in millimeters, of the standard paper format.
1005.PP
1006The
1007.B LC_PAPER
1008definition ends with the string
1009.IR "END LC_PAPER" .
86c4fcad
MK
1010.SS LC_TELEPHONE
1011The definition starts with the string
1012.B LC_TELEPHONE
1013in the first column.
1014
1015The following keywords are allowed:
1016.TP
1017.I tel_int_fmt
1018followed by a string that contains field descriptors that identify
1019the format used to dial international numbers.
1020The following field descriptors are recognized:
1021.\" From localedata/locales/uk_UA
1022.RS
1023.TP
1024%a
5f7504ef 1025Area code without nationwide prefix (the prefix is often "00").
86c4fcad
MK
1026.TP
1027%A
1028Area code including nationwide prefix.
1029.TP
1030%l
1031Local number (within area code).
1032.TP
1033%e
1034Extension (to local number).
1035.TP
1036%c
1037Country code.
1038.TP
1039%C
5f7504ef 1040Alternate carrier service code used for dialing abroad.
86c4fcad
MK
1041.TP
1042%t
1043If the preceding field descriptor resulted in an empty string,
1044then the empty string, otherwise a space character.
1045.RE
1046.TP
1047.I tel_dom_fmt
1048followed by a string that contains field descriptors that identify
1049the format used to dial domestic numbers.
5f7504ef 1050The recognized field descriptors are the same as for
86c4fcad
MK
1051.IR tel_int_fmt .
1052.TP
1053.I int_select
1054followed by the prefix used to call international phone numbers.
1055.TP
1056.I int_prefix
1057followed by the prefix used from other countries to dial this country.
1058.PP
1059The
1060.B LC_TELEPHONE
1061definition ends with the string
1062.IR "END LC_TELEPHONE" .
fea681da
MK
1063.SS LC_TIME
1064The definition starts with the string
1065.B LC_TIME
1066in the first column.
1067
1068The following keywords are allowed:
bea08fec
MK
1069.\" FIXME The following LC_TIME keywords are not documented:
1070.\" era
1071.\" era_d_fmt
1072.\" era_d_t_fmt
1073.\" era_t_fmt
1074.\" timezone
fea681da
MK
1075.TP
1076.I abday
b458e1bf 1077followed by a list of abbreviated names of the days of the week.
33af8501
MK
1078The list starts with the first day of the week
1079as specified by
1080.I week
ee565781
MK
1081(Sunday by default).
1082See NOTES.
fea681da
MK
1083.TP
1084.I day
b458e1bf 1085followed by a list of names of the days of the week.
33af8501
MK
1086The list starts with the first day of the week
1087as specified by
1088.I week
ee565781
MK
1089(Sunday by default).
1090See NOTES.
fea681da
MK
1091.TP
1092.I abmon
1093followed by a list of abbreviated month names.
1094.TP
1095.I mon
1096followed by a list of month names.
1097.TP
1098.I am_pm
2f41dcab 1099followed by the appropriate representation of the
fea681da 1100.B am
c13182ef 1101and
fea681da 1102.B pm
c33a8494 1103strings.
0c2dbad1 1104This should be left empty for locales not using AM/PM convention.
fea681da
MK
1105.TP
1106.I d_t_fmt
2f41dcab 1107followed by the appropriate date and time format.
fea681da
MK
1108.TP
1109.I d_fmt
2f41dcab 1110followed by the appropriate date format.
fea681da
MK
1111.TP
1112.I t_fmt
2f41dcab 1113followed by the appropriate time format.
fea681da
MK
1114.TP
1115.I t_fmt_ampm
2f41dcab 1116followed by the appropriate time format when using 12h clock format.
0c2dbad1 1117This should be left empty for locales not using AM/PM convention.
33af8501
MK
1118.TP
1119.I week
f809007b 1120followed by a list of three values as plain numbers:
33af8501
MK
1121The number of days in a week (by default 7),
1122a date of beginning of the week (by default corresponds to Sunday),
1123and the minimal length of the first week in year (by default 4).
1124Regarding the start of the week,
1125.B 19971130
1126shall be used for Sunday and
1127.B 19971201
67da5267 1128shall be used for Monday.
756f4b97 1129See NOTES.
33af8501
MK
1130.TP
1131.IR first_weekday " (since glibc 2.2)"
2f41dcab 1132followed by the number of the first day from the
33af8501
MK
1133.I day
1134list to be shown in calendar applications.
1135The default value of
1136.B 1
f809007b 1137(plain number) corresponds to either Sunday or Monday depending
33af8501
MK
1138on the value of the second
1139.I week
ee565781
MK
1140list item.
1141See NOTES.
33af8501
MK
1142.TP
1143.IR first_workday " (since glibc 2.2)"
2f41dcab 1144followed by the number of the first working day from the
33af8501
MK
1145.I day
1146list.
71ad8cf0 1147The default value is
360d3116 1148.BR 2
f809007b 1149(plain number).
756f4b97 1150See NOTES.
d96eca4d
MK
1151.TP
1152.I cal_direction
1153.\" from localedata/locales/uk_UA
f809007b 1154followed by a plain number value that indicates the direction for the
d96eca4d
MK
1155display of calendar dates, as follows:
1156.RS
1157.TP
5f7504ef
DP
1158.B 1
1159Left-right from top.
d96eca4d 1160.TP
5f7504ef
DP
1161.B 2
1162Top-down from left.
d96eca4d 1163.TP
5f7504ef
DP
1164.B 3
1165Right-left from top.
d96eca4d
MK
1166.RE
1167.TP
1168.I date_fmt
d96eca4d
MK
1169followed by the appropriate date representation for
1170.BR date (1).
89257a53
MM
1171.TP
1172.I alt_digits
1173followed by the alternative digits used for date and time in the locale.
fea681da 1174.PP
c13182ef 1175The
fea681da 1176.B LC_TIME
c13182ef 1177definition ends with the string
74d32233 1178.IR "END LC_TIME" .
fea681da 1179.SH FILES
11faa348
MM
1180.TP
1181.I /usr/lib/locale/locale-archive
1182Usual default locale archive location.
1183.TP
1184.I /usr/share/i18n/locales
1185Usual default path for locale definition files.
47297adb 1186.SH CONFORMING TO
5fc5fff3 1187POSIX.2, ISO/IEC TR 14652.
756f4b97
MM
1188.SH NOTES
1189The collective GNU C library community wisdom regarding
95c24117 1190.IR abday ,
756f4b97
MM
1191.IR day ,
1192.IR week ,
95c24117 1193.IR first_weekday ,
756f4b97 1194and
95c24117 1195.I first_workday
756f4b97
MM
1196states at
1197https://sourceware.org/glibc/wiki/Locales
1198the following:
956088f4 1199.IP * 3
756f4b97
MM
1200The value of the second
1201.I week
1202list item specifies the base of the
95c24117
MM
1203.I abday
1204and
756f4b97 1205.I day
95c24117 1206lists.
956088f4 1207.IP *
756f4b97
MM
1208.I first_weekday
1209specifies the offset of the first day-of-week in the
95c24117
MM
1210.I abday
1211and
756f4b97 1212.I day
95c24117 1213lists.
956088f4 1214.IP *
756f4b97
MM
1215For compatibility reasons, all glibc locales should set the value of the
1216second
1217.I week
1218list item to
1219.B 19971130
1220(Sunday) and base the
95c24117
MM
1221.I abday
1222and
756f4b97 1223.I day
95c24117 1224lists appropriately, and set
756f4b97 1225.I first_weekday
f809007b
MM
1226and
1227.I first_workday
756f4b97
MM
1228to
1229.B 1
1230or
1231.BR 2 ,
f809007b
MM
1232depending on whether the week and work week actually starts on Sunday or
1233Monday for the locale.
fea681da 1234.SH BUGS
23618627 1235This manual page isn't complete.
fea681da
MK
1236.\" .SH AUTHOR
1237.\" Jochen Hein (Hein@Student.TU-Clausthal.de)
47297adb 1238.SH SEE ALSO
fea681da
MK
1239.BR locale (1),
1240.BR localedef (1),
1241.BR localeconv (3),
b4bde2e0 1242.BR newlocale (3),
fea681da 1243.BR setlocale (3),
b4bde2e0 1244.BR uselocale (3),
aa99bf8a 1245.BR charmap (5),
0c2dbad1
MM
1246.BR charsets (7),
1247.BR locale (7),
1248.BR unicode (7),
1249.BR utf-8 (7)