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