1 .\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de)
2 .\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz)
3 .\" Copyright (C) 2014 Michael Kerrisk <mtk@manpages@gmail.com>
5 .\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
6 .\" This program is free software; you can redistribute it and/or modify
7 .\" it under the terms of the GNU General Public License as published by
8 .\" the Free Software Foundation; either version 2 of the License, or
9 .\" (at your option) any later version.
11 .\" This program is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 .\" GNU General Public License for more details.
16 .\" You should have received a copy of the GNU General Public
17 .\" License along with this manual; if not, see
18 .\" <http://www.gnu.org/licenses/>.
21 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
22 .\" LC_TIME: Describe first_weekday and first_workday
24 .TH LOCALE 5 2014-05-23 "Linux" "Linux User Manual"
26 locale \- describes a locale definition file
30 definition file contains all the information that the
32 command needs to convert it into the binary locale database.
34 The definition files consist of sections which each describe a
35 locale category in detail.
37 The locale definition file starts with a header that may consist
38 of the following keywords:
41 is followed by a character that should be used as the
42 escape-character for the rest of the file to mark characters that
43 should be interpreted in a special way.
44 It defaults to the backslash (\\).
47 is followed by a character that will be used as the
48 comment-character for the rest of the file.
49 It defaults to the number sign (#).
51 The locale definition has one part for each locale category.
52 Each part can be copied from another existing locale or
53 can be defined from scratch.
54 If the category should be copied,
55 the only valid keyword in the definition is
57 followed by the name of the locale which should be copied.
58 .SS Locale category sections
59 The following category sections are defined by POSIX:
73 In addition, since version 2.2,
74 the GNU C library supports the following nonstandard categories:
88 The definition starts with the string
92 The following keywords are allowed:
93 .\" Thanks to the kind folk who wrote localedata/locales/uk_UA
96 followed by a string containing field descriptors that define
97 the format used for postal addresses in the locale.
98 The following field descriptors are recognized:
99 .\" From localedata/locales/uk_UA:
103 .\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not supported
105 .\" Person's name, possibly constructed with the
111 Care of person, or organization.
123 Street or block (e.g., Japanese) name.
126 House number or designation.
129 Insert an end-of-line if the previous descriptor's value was not an empty
130 string; otherwise ignore.
133 Insert a space if the previous descriptor's value was not an empty string;
137 Room number, door designation.
143 Country designation, from the <country_post> keyword.
146 .\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not
147 .\" supported by glibc
148 .\" Local township within town or city.
151 Zip number, postal code.
157 State, province, or prefecture.
160 Country, as taken from data record.
162 Each field descriptor may have an \(aqR\(aq after
163 the \(aq%\(aq to specify that the
164 information is taken from a Romanized version string of the
170 followed by the country name in the language of the current document
171 (e.g., "Deutschland" for the
176 followed by the abbreviation of the country (see CERT_MAILCODES).
179 followed by the two-letter abbreviation of the country (ISO 3166).
182 followed by the three-letter abbreviation of the country (ISO 3166).
185 followed by the numeric country code (ISO 3166).
188 followed by the code for the country car number.
191 followed by the ISBN code (for books).
194 followed by the language name in the language of the current document.
197 followed by the two-letter abbreviation of the language (ISO 639).
200 followed by the three-letter abbreviation of the language (ISO 639-2/T).
203 followed by the three-letter abbreviation of the language for library
205 Applications should in general prefer
212 definition ends with the string
213 .IR "END LC_ADDRESS" .
215 The definition starts with the string
219 The following keywords are allowed:
220 .\" FIXME translit_start + translit_end are not documented
221 .\" FIXME 'charclass' is not documented
222 .\" FIXME 'charconv' is not documented
223 .\" FIXME 'outdigit' is not documented
224 .\" FIXME 'include' is not documented
225 .\" FIXME 'map' (to_inpunct, to_outpunct) is not documented
228 followed by a list of uppercase letters.
233 are included automatically.
234 Characters also specified as
243 followed by a list of lowercase letters.
248 are included automatically.
249 Characters also specified as
258 followed by a list of letters.
259 All character specified as either
263 are automatically included.
264 Characters also specified as
273 followed by the characters classified as numeric digits.
280 They are included by default in this class.
283 followed by a list of characters defined as white-space
285 Characters also specified as
298 .BR <carriage-return> ,
302 are automatically included.
305 followed by a list of control characters.
306 Characters also specified as
319 followed by a list of punctuation characters.
330 character are not allowed.
333 followed by a list of printable characters, not including the
336 The characters defined as
344 are automatically included.
345 Characters also specified as
350 followed by a list of printable characters, including the
353 The characters defined as
362 character are automatically included.
363 Characters also specified as
368 followed by a list of characters classified as hexadecimal
370 The decimal digits must be included followed by one or
371 more set of six characters in ascending order.
373 characters are included by default:
385 followed by a list of characters classified as
391 are automatically included.
394 followed by a list of mappings from lowercase to uppercase
396 Each mapping is a pair of a lowercase and an uppercase letter
399 and enclosed in parentheses.
400 The members of the list are separated
404 followed by a list of mappings from uppercase to lowercase
406 If the keyword tolower is not present, the reverse of the
407 toupper list is used.
411 definition ends with the string
414 .\" FIXME: the description of LC_COLLATE lacks a lot of details
417 category defines the rules for collating characters.
419 limitations of libc not all POSIX-options are implemented.
421 The definition starts with the string
425 The following keywords are allowed:
426 .\" FIXME 'script' is not documented
427 .\" FIXME 'symbol-equivalence' is not documented
430 followed by the definition of a collating-element symbol
431 representing a multicharacter collating element.
434 followed by the definition of a collating symbol
435 that can be used in collation order statements.
437 The order-definition starts with a line:
440 followed by a list of keywords chosen from
445 The order definition consists of lines that describe the order
446 and is terminated with the keyword
448 .\" FIXME 'reorder-after' is not documented
449 .\" FIXME 'reorder-end' is not documented
450 .\" FIXME 'reorder-sections-after' is not documented
451 .\" FIXME 'reorder-sections-end' is not documented
455 definition ends with the string
456 .IR "END LC_COLLATE" .
457 .SS LC_IDENTIFICATION
458 This category contains meta-information about the locale definition.
460 The definition starts with the string
464 The following keywords are allowed:
467 followed by the title of the locale document
468 (e.g., "Maori language locale for New Zealand").
471 followed by the name of the organization that maintains this document.
474 followed by the address of the organization that maintains this document.
477 followed by the name of the contact person at
478 the organization that maintains this document.
481 followed by the email address of the person or
482 organization that maintains this document.
485 followed by the telephone number (in international format)
486 of the organization that maintains this document.
489 followed by the fax number (in international format)
490 of the organization that maintains this document.
493 followed by the name of the language to which this document applies.
496 followed by the name of the country/geographic extent
497 to which this document applies.
500 followed by a description of the audience for which this document is intended.
503 followed by a description of any special application
504 for which this document is intended.
507 .\" as far as I can tell... (mtk)
508 followed by the short name for this document.
511 followed by the revision number of this document.
514 followed by the revision date of this document.
516 In addition, for each of the categories defined by the document,
517 there should be a line starting with the keyword
521 a string that identifies this locale category definition,
531 definition ends with the string
532 .IR "END LC_IDENTIFICATION" .
534 The definition starts with the string
538 The following keywords are allowed:
541 followed by a regular expression that describes possible
545 followed by a regular expression that describes possible
549 followed by the output string corresponding to "yes".
552 followed by the output string corresponding to "no".
556 definition ends with the string
557 .IR "END LC_MESSAGES" .
559 The definition starts with the string
563 The following keywords are allowed:
566 followed by number identifying the standard used for measurement.
567 The following values are recognized:
574 US customary measurements.
579 definition ends with the string
580 .IR "END LC_MEASUREMENT" .
582 The definition starts with the string
586 The following keywords are allowed:
589 followed by the international currency symbol.
591 4-character string containing the international currency symbol as
592 defined by the ISO 4217 standard (three characters) followed by a
596 followed by the local currency symbol.
599 followed by the string that will be used as the decimal delimiter
600 when formatting monetary quantities.
603 followed by the string that will be used as a group separator
604 when formatting monetary quantities.
607 followed by a sequence of integers separated by semicolons that
608 describe the formatting of monetary quantities.
614 followed by a string that is used to indicate a positive sign for
618 followed by a string that is used to indicate a negative sign for
622 followed by the number of fractional digits that should be used when
624 .IR int_curr_symbol .
627 followed by the number of fractional digits that should be used when
629 .IR currency_symbol .
632 followed by an integer that indicates the placement of
634 for a nonnegative formatted monetary quantity:
638 the symbol succeeds the value.
641 the symbol precedes the value.
645 followed by an integer that indicates the placement of
647 for a negative formatted monetary quantity.
648 The same values are recognized as for
652 followed by an integer that indicates the placement of
653 .I int_currency_symbol
654 for a nonnegative internationally formatted monetary quantity.
655 The same values are recognized as for
659 followed by an integer that indicates the placement of
660 .I int_currency_symbol
661 for a negative internationally formatted monetary quantity.
662 The same values are recognized as for
666 followed by an integer that indicates the separation of
667 .IR currency_symbol ,
668 the sign string, and the value for a nonnegative formatted monetary quantity.
669 The following values are recognized:
673 No space separates the currency symbol and the value.
676 If the currency symbol and the sign string are adjacent,
677 a space separates them from the value;
678 otherwise a space separates the currency symbol and the value.
681 If the currency symbol and the sign string are adjacent,
682 a space separates them from the value;
683 otherwise a space separates the sign string and the value.
687 followed by an integer that indicates the separation of
688 .IR currency_symbol ,
689 the sign string, and the value for a negative formatted monetary quantity.
690 The same values are recognized as for
693 .I int_p_sep_by_space
694 followed by an integer that indicates the separation of
695 .IR int_currency_symbol ,
697 and the value for a nonnegative internationally formatted monetary quantity.
698 The same values are recognized as for
701 .I int_n_sep_by_space
702 followed by an integer that indicates the separation of
703 .IR int_currency_symbol ,
705 and the value for a negative internationally formatted monetary quantity.
706 The same values are recognized as for
710 followed by an integer that indicates where the
712 should be placed for a nonnegative monetary quantity:
716 Parentheses enclose the quantity and the
719 .IR int_curr_symbol .
722 The sign string precedes the quantity and the
725 .IR int_curr_symbol .
728 The sign string succeeds the quantity and the
731 .IR int_curr_symbol .
734 The sign string precedes the
737 .IR int_curr_symbol .
740 The sign string succeeds the
743 .IR int_curr_symbol .
747 followed by an integer that indicates where the
749 should be placed for a negative monetary quantity.
750 The same values are recognized as for
754 followed by an integer that indicates where the
756 should be placed for a nonnegative
757 internationally formatted monetary quantity.
758 The same values are recognized as for
762 followed by an integer that indicates where the
764 should be placed for a negative
765 internationally formatted monetary quantity.
766 The same values are recognized as for
771 definition ends with the string
772 .IR "END LC_MONETARY" .
774 The definition starts with the string
778 Various keywords are allowed, but only
781 Other keywords are needed only if there is common convention to
782 use the corresponding salutation in this locale.
783 The allowed keywords are as follows:
786 followed by a string containing field descriptors that define
787 the format used for names in the locale.
788 The following field descriptors are recognized:
789 .\" From localedata/locales/uk_UA:
796 Family names in uppercase.
805 First given name with Latin letters.
811 Additional given name(s).
814 Initials for additional given name(s).
820 Salutation, such as "Doctor".
823 Abbreviated salutation, such as "Mr." or "Dr.".
826 Salutation, using the FDCC-sets conventions.
827 .\" 1 for the name_gen
828 .\" In glibc 2.19, %d1 is used in only:
829 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
830 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
831 .\" In glibc 2.19, %d[2-5] appear to be not used at all
838 If the preceding field descriptor resulted in an empty string,
839 then the empty string, otherwise a space character.
843 followed by the general salutation for any gender.
846 followed by the salutation for men.
849 followed by the salutation for married women.
852 followed by the salutation for unmarried women.
855 followed by the salutation valid for all women.
859 definition ends with the string
862 The definition starts with the string
866 The following keywords are allowed:
869 followed by the string that will be used as the decimal delimiter
870 when formatting numeric quantities.
873 followed by the string that will be used as a group separator
874 when formatting numeric quantities.
877 followed by a sequence of integers separated by semicolons that
878 describe the formatting of numeric quantities.
880 Each integer specifies the number of digits in a group.
881 The first integer defines the size of the group immediately
882 to the left of the decimal delimiter.
883 Subsequent integers define succeeding groups to the
884 left of the previous group.
885 If the last integer is not \-1, then the size of the previous group
886 (if any) is repeatedly used for the remainder of the digits.
887 If the last integer is \-1, then no further grouping is performed.
891 definition ends with the string
892 .IR "END LC_NUMERIC" .
894 The definition starts with the string
898 The following keywords are allowed:
901 followed by the height, in millimeters, of the standard paper format.
904 followed by the width, in millimeters, of the standard paper format.
908 definition ends with the string
911 The definition starts with the string
915 The following keywords are allowed:
918 followed by a string that contains field descriptors that identify
919 the format used to dial international numbers.
920 The following field descriptors are recognized:
921 .\" From localedata/locales/uk_UA
925 Area code without nationwide prefix (the prefix is often "00").
928 Area code including nationwide prefix.
931 Local number (within area code).
934 Extension (to local number).
940 Alternate carrier service code used for dialing abroad.
943 If the preceding field descriptor resulted in an empty string,
944 then the empty string, otherwise a space character.
948 followed by a string that contains field descriptors that identify
949 the format used to dial domestic numbers.
950 The recognized field descriptors are the same as for
954 followed by the prefix used to call international phone numbers.
957 followed by the prefix used from other countries to dial this country.
961 definition ends with the string
962 .IR "END LC_TELEPHONE" .
964 The definition starts with the string
968 The following keywords are allowed:
969 .\" FIXME 'era', 'era_d_fmt', 'era_d_t_fmt', 'era_t_fmt', are not documented
970 .\" FIXME 'timezone' is not documented
973 followed by a list of abbreviated names of the days of the week.
974 The list starts with the first day of the week
981 followed by a list of names of the days of the week.
982 The list starts with the first day of the week
989 followed by a list of abbreviated month names.
992 followed by a list of month names.
995 followed by the appropriate representation of the
1000 This should be left empty for locales not using AM/PM convention.
1003 followed by the appropriate date and time format.
1006 followed by the appropriate date format.
1009 followed by the appropriate time format.
1012 followed by the appropriate time format when using 12h clock format.
1013 This should be left empty for locales not using AM/PM convention.
1016 followed by a list of three values:
1017 The number of days in a week (by default 7),
1018 a date of beginning of the week (by default corresponds to Sunday),
1019 and the minimal length of the first week in year (by default 4).
1020 Regarding the start of the week,
1022 shall be used for Sunday and
1024 shall be used for Monday.
1027 .IR first_weekday " (since glibc 2.2)"
1028 followed by the number of the first day from the
1030 list to be shown in calendar applications.
1031 The default value of
1033 corresponds to either Sunday or Monday depending
1034 on the value of the second
1039 .IR first_workday " (since glibc 2.2)"
1040 followed by the number of the first working day from the
1043 The default value is
1048 .\" from localedata/locales/uk_UA
1049 followed by a value that indicates the direction for the
1050 display of calendar dates, as follows:
1054 Left-right from top.
1060 Right-left from top.
1064 followed by the appropriate date representation for
1069 definition ends with the string
1073 .I /usr/lib/locale/locale-archive
1074 Usual default locale archive location.
1076 .I /usr/share/i18n/locales
1077 Usual default path for locale definition files.
1079 POSIX.2, ISO/IEC TR 14652.
1081 The collective GNU C library community wisdom regarding
1089 https://sourceware.org/glibc/wiki/Locales
1092 The value of the second
1094 list item specifies the base of the
1101 specifies the offset of the first day-of-week in the
1107 For compatibility reasons, all glibc locales should set the value of the
1112 (Sunday) and base the
1116 lists appropriately, and set
1122 depending on whether the week actually starts on Sunday or Monday
1125 This manual page isn't complete.
1127 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)