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