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