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