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