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