1 '\" t -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de)
3 .\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz)
4 .\" Copyright (C) 2014 Michael Kerrisk <mtk@manpages@gmail.com>
6 .\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
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.
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.
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/>.
22 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
23 .\" LC_TIME: Describe first_weekday and first_workday
25 .TH LOCALE 5 2016-03-15 "Linux" "Linux User Manual"
27 locale \- describes a locale definition file
31 definition file contains all the information that the
33 command needs to convert it into the binary locale database.
35 The definition files consist of sections which each describe a
36 locale category in detail.
39 for additional details for these categories.
41 The locale definition file starts with a header that may consist
42 of the following keywords:
45 is followed by a character that should be used as the
46 escape-character for the rest of the file to mark characters that
47 should be interpreted in a special way.
48 It defaults to the backslash (\\).
51 is followed by a character that will be used as the
52 comment-character for the rest of the file.
53 It defaults to the number sign (#).
55 The locale definition has one part for each locale category.
56 Each part can be copied from another existing locale or
57 can be defined from scratch.
58 If the category should be copied,
59 the only valid keyword in the definition is
61 followed by the name of the locale in double quotes which should be
63 The exceptions for this rule are
69 statement can be followed by locale-specific rules and selected overrides.
71 When defining a category from scratch, all field descriptors and strings
72 should be defined as Unicode code points in angle brackets, unless
73 otherwise stated below.
74 For example, "€" is to be presented as "<U20AC>", "%a" as
75 "<U0025><U0061>", and "Monday" as
76 "<U0053><U0075><U006E><U0064><U0061><U0079>".
77 Values defined as Unicode code points must be in double quotes, plain
78 number values are not quoted (but
82 follow special formatting, see the system-provided locale files for
84 .SS Locale category sections
85 The following category sections are defined by POSIX:
99 In addition, since version 2.2,
100 the GNU C library supports the following nonstandard categories:
116 for a more detailed description of each category.
119 The definition starts with the string
123 The following keywords are allowed:
124 .\" Thanks to the kind folk who wrote localedata/locales/uk_UA
127 followed by a string containing field descriptors that define
128 the format used for postal addresses in the locale.
129 The following field descriptors are recognized:
130 .\" From localedata/locales/uk_UA:
134 .\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not supported
136 .\" Person's name, possibly constructed with the
141 .\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
144 Care of person, or organization.
156 Street or block (e.g., Japanese) name.
159 House number or designation.
162 Insert an end-of-line if the previous descriptor's value was not an empty
163 string; otherwise ignore.
166 Insert a space if the previous descriptor's value was not an empty string;
170 Room number, door designation.
176 Country designation, from the <country_post> keyword.
179 .\" BUG: %l escape sequence from ISO/IEC 14652:2002 is not
180 .\" supported by glibc
181 .\" Local township within town or city.
183 .\" https://sourceware.org/bugzilla/show_bug.cgi?id=16983
186 Zip number, postal code.
192 State, province, or prefecture.
195 Country, as taken from data record.
197 Each field descriptor may have an \(aqR\(aq after
198 the \(aq%\(aq to specify that the
199 information is taken from a Romanized version string of the
204 followed by the country name in the language of the current document
205 (e.g., "Deutschland" for the
210 followed by the abbreviation of the country (see CERT_MAILCODES).
213 followed by the two-letter abbreviation of the country (ISO 3166).
216 followed by the three-letter abbreviation of the country (ISO 3166).
219 followed by the numeric country code as plain numbers (ISO 3166).
222 followed by the code for the country car number.
225 followed by the ISBN code (for books).
228 followed by the language name in the language of the current document.
231 followed by the two-letter abbreviation of the language (ISO 639).
234 followed by the three-letter abbreviation of the language (ISO 639-2/T).
237 followed by the three-letter abbreviation of the language for library
239 Applications should in general prefer
246 definition ends with the string
247 .IR "END LC_ADDRESS" .
249 The definition starts with the string
253 The following keywords are allowed:
256 followed by a list of uppercase letters.
261 are included automatically.
262 Characters also specified as
271 followed by a list of lowercase letters.
276 are included automatically.
277 Characters also specified as
286 followed by a list of letters.
287 All character specified as either
291 are automatically included.
292 Characters also specified as
301 followed by the characters classified as numeric digits.
308 They are included by default in this class.
311 followed by a list of characters defined as white-space
313 Characters also specified as
326 .BR <carriage-return> ,
330 are automatically included.
333 followed by a list of control characters.
334 Characters also specified as
347 followed by a list of punctuation characters.
358 character are not allowed.
361 followed by a list of printable characters, not including the
364 The characters defined as
372 are automatically included.
373 Characters also specified as
378 followed by a list of printable characters, including the
381 The characters defined as
390 character are automatically included.
391 Characters also specified as
396 followed by a list of characters classified as hexadecimal
398 The decimal digits must be included followed by one or
399 more set of six characters in ascending order.
401 characters are included by default:
413 followed by a list of characters classified as
419 are automatically included.
422 followed by a list of locale-specific character class names
423 which are then to be defined in the locale.
426 followed by a list of mappings from lowercase to uppercase
428 Each mapping is a pair of a lowercase and an uppercase letter
431 and enclosed in parentheses.
432 The members of the list are separated
436 followed by a list of mappings from uppercase to lowercase
438 If the keyword tolower is not present, the reverse of the
439 toupper list is used.
442 followed by a list of mapping pairs of
443 characters and letters
444 to be used in titles (headings).
447 followed by a locale-specific character class definition,
448 starting with the class name followed by the characters
449 belonging to the class.
452 followed by a list of locale-specific character mapping names
453 which are then to be defined in the locale.
456 followed by a list of alternate output digits for the locale.
459 followed by a list of mapping pairs of
460 alternate digits and separators
461 for input digits for the locale.
464 followed by a list of mapping pairs of
466 for output for the locale.
469 marks the start of the transliteration rules section.
470 The section can contain the
472 keyword in the beginning followed by
473 locale-specific rules and overrides.
474 Any rule specified in the locale file
475 will override any rule
476 copied or included from other files.
477 In case of duplicate rule definitions in the locale file,
478 only the first rule is used.
480 A transliteration rule consist of a character to be transliterated
481 followed by a list of transliteration targets separated by semicolons.
482 The first target which can be presented in the target character set
483 is used, if none of them can be used the
485 character will be used instead.
488 in the transliteration rules section includes
489 a transliteration rule file
490 (and optionally a repertoire map file).
493 in the transliteration rules section
494 defines the default character to be used for
495 transliteration where none of the targets cannot be presented
496 in the target character set.
499 marks the end of the transliteration rules.
503 definition ends with the string
506 Due to limitations of glibc not all POSIX-options are implemented.
508 The definition starts with the string
512 The following keywords are allowed:
513 .\" FIXME The following LC_COLLATE keywords are not documented:
516 .\" reorder-sections-after
517 .\" reorder-sections-end
519 .\" symbol-equivalence
522 followed by the definition of a collating-element symbol
523 representing a multicharacter collating element.
526 followed by the definition of a collating symbol
527 that can be used in collation order statements.
529 The order-definition starts with a line:
532 followed by a list of keywords chosen from
537 The order definition consists of lines that describe the order
538 and is terminated with the keyword
543 definition ends with the string
544 .IR "END LC_COLLATE" .
545 .SS LC_IDENTIFICATION
546 The definition starts with the string
550 The values in this category are defined as plain strings.
552 The following keywords are allowed:
555 followed by the title of the locale document
556 (e.g., "Maori language locale for New Zealand").
559 followed by the name of the organization that maintains this document.
562 followed by the address of the organization that maintains this document.
565 followed by the name of the contact person at
566 the organization that maintains this document.
569 followed by the email address of the person or
570 organization that maintains this document.
573 followed by the telephone number (in international format)
574 of the organization that maintains this document.
575 As of glibc 2.24, this keyword is deprecated in favor of
576 other contact methods.
579 followed by the fax number (in international format)
580 of the organization that maintains this document.
581 As of glibc 2.24, this keyword is deprecated in favor of
582 other contact methods.
585 followed by the name of the language to which this document applies.
588 followed by the name of the country/geographic extent
589 to which this document applies.
592 followed by a description of the audience for which this document is intended.
595 followed by a description of any special application
596 for which this document is intended.
599 .\" as far as I can tell... (mtk)
600 followed by the short name for this document.
603 followed by the revision number of this document.
606 followed by the revision date of this document.
608 In addition, for each of the categories defined by the document,
609 there should be a line starting with the keyword
613 a string that identifies this locale category definition,
623 definition ends with the string
624 .IR "END LC_IDENTIFICATION" .
626 The definition starts with the string
630 The following keywords are allowed:
633 followed by a regular expression that describes possible
637 followed by a regular expression that describes possible
641 followed by the output string corresponding to "yes".
644 followed by the output string corresponding to "no".
648 definition ends with the string
649 .IR "END LC_MESSAGES" .
651 The definition starts with the string
655 The following keywords are allowed:
658 followed by number identifying the standard used for measurement.
659 The following values are recognized:
666 US customary measurements.
671 definition ends with the string
672 .IR "END LC_MEASUREMENT" .
674 The definition starts with the string
679 .IR int_curr_symbol ,
680 .IR currency_symbol ,
681 .IR mon_decimal_point ,
682 .IR mon_thousands_sep ,
686 are defined as Unicode code points, the others as plain numbers.
688 The following keywords are allowed:
691 followed by the international currency symbol.
693 4-character string containing the international currency symbol as
694 defined by the ISO 4217 standard (three characters) followed by a
698 followed by the local currency symbol.
701 followed by the string that will be used as the decimal delimiter
702 when formatting monetary quantities.
705 followed by the string that will be used as a group separator
706 when formatting monetary quantities.
709 followed by a sequence of integers separated by semicolons that
710 describe the formatting of monetary quantities.
716 followed by a string that is used to indicate a positive sign for
720 followed by a string that is used to indicate a negative sign for
724 followed by the number of fractional digits that should be used when
726 .IR int_curr_symbol .
729 followed by the number of fractional digits that should be used when
731 .IR currency_symbol .
734 followed by an integer that indicates the placement of
736 for a nonnegative formatted monetary quantity:
740 the symbol succeeds the value.
743 the symbol precedes the value.
747 followed by an integer that indicates the separation of
748 .IR currency_symbol ,
749 the sign string, and the value for a nonnegative formatted monetary quantity.
750 The following values are recognized:
754 No space separates the currency symbol and the value.
757 If the currency symbol and the sign string are adjacent,
758 a space separates them from the value;
759 otherwise a space separates the currency symbol and the value.
762 If the currency symbol and the sign string are adjacent,
763 a space separates them from the value;
764 otherwise a space separates the sign string and the value.
768 followed by an integer that indicates the placement of
770 for a negative formatted monetary quantity.
771 The same values are recognized as for
775 followed by an integer that indicates the separation of
776 .IR currency_symbol ,
777 the sign string, and the value for a negative formatted monetary quantity.
778 The same values are recognized as for
782 followed by an integer that indicates where the
784 should be placed for a nonnegative monetary quantity:
788 Parentheses enclose the quantity and the
791 .IR int_curr_symbol .
794 The sign string precedes the quantity and the
797 .IR int_curr_symbol .
800 The sign string succeeds the quantity and the
803 .IR int_curr_symbol .
806 The sign string precedes the
809 .IR int_curr_symbol .
812 The sign string succeeds the
815 .IR int_curr_symbol .
819 followed by an integer that indicates where the
821 should be placed for a negative monetary quantity.
822 The same values are recognized as for
826 followed by an integer that indicates the placement of
827 .I int_currency_symbol
828 for a nonnegative internationally formatted monetary quantity.
829 The same values are recognized as for
833 followed by an integer that indicates the placement of
834 .I int_currency_symbol
835 for a negative internationally formatted monetary quantity.
836 The same values are recognized as for
839 .I int_p_sep_by_space
840 followed by an integer that indicates the separation of
841 .IR int_currency_symbol ,
843 and the value for a nonnegative internationally formatted monetary quantity.
844 The same values are recognized as for
847 .I int_n_sep_by_space
848 followed by an integer that indicates the separation of
849 .IR int_currency_symbol ,
851 and the value for a negative internationally formatted monetary quantity.
852 The same values are recognized as for
856 followed by an integer that indicates where the
858 should be placed for a nonnegative
859 internationally formatted monetary quantity.
860 The same values are recognized as for
864 followed by an integer that indicates where the
866 should be placed for a negative
867 internationally formatted monetary quantity.
868 The same values are recognized as for
873 definition ends with the string
874 .IR "END LC_MONETARY" .
876 The definition starts with the string
880 Various keywords are allowed, but only
883 Other keywords are needed only if there is common convention to
884 use the corresponding salutation in this locale.
885 The allowed keywords are as follows:
888 followed by a string containing field descriptors that define
889 the format used for names in the locale.
890 The following field descriptors are recognized:
891 .\" From localedata/locales/uk_UA:
898 Family names in uppercase.
907 First given name with Latin letters.
913 Additional given name(s).
916 Initials for additional given name(s).
922 Salutation, such as "Doctor".
925 Abbreviated salutation, such as "Mr." or "Dr.".
928 Salutation, using the FDCC-sets conventions.
929 .\" 1 for the name_gen
930 .\" In glibc 2.19, %d1 is used in only:
931 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
932 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
933 .\" In glibc 2.19, %d[2-5] appear to be not used at all
940 If the preceding field descriptor resulted in an empty string,
941 then the empty string, otherwise a space character.
945 followed by the general salutation for any gender.
948 followed by the salutation for men.
951 followed by the salutation for married women.
954 followed by the salutation for unmarried women.
957 followed by the salutation valid for all women.
961 definition ends with the string
964 The definition starts with the string
968 The following keywords are allowed:
971 followed by the string that will be used as the decimal delimiter
972 when formatting numeric quantities.
975 followed by the string that will be used as a group separator
976 when formatting numeric quantities.
979 followed by a sequence of integers as plain numbers separated by
980 semicolons that describe the formatting of numeric quantities.
982 Each integer specifies the number of digits in a group.
983 The first integer defines the size of the group immediately
984 to the left of the decimal delimiter.
985 Subsequent integers define succeeding groups to the
986 left of the previous group.
987 If the last integer is not \-1, then the size of the previous group
988 (if any) is repeatedly used for the remainder of the digits.
989 If the last integer is \-1, then no further grouping is performed.
993 definition ends with the string
994 .IR "END LC_NUMERIC" .
996 The definition starts with the string
1000 Values in this category are defined as plain numbers.
1002 The following keywords are allowed:
1005 followed by the height, in millimeters, of the standard paper format.
1008 followed by the width, in millimeters, of the standard paper format.
1012 definition ends with the string
1013 .IR "END LC_PAPER" .
1015 The definition starts with the string
1017 in the first column.
1019 The following keywords are allowed:
1022 followed by a string that contains field descriptors that identify
1023 the format used to dial international numbers.
1024 The following field descriptors are recognized:
1025 .\" From localedata/locales/uk_UA
1029 Area code without nationwide prefix (the prefix is often "00").
1032 Area code including nationwide prefix.
1035 Local number (within area code).
1038 Extension (to local number).
1044 Alternate carrier service code used for dialing abroad.
1047 If the preceding field descriptor resulted in an empty string,
1048 then the empty string, otherwise a space character.
1052 followed by a string that contains field descriptors that identify
1053 the format used to dial domestic numbers.
1054 The recognized field descriptors are the same as for
1058 followed by the prefix used to call international phone numbers.
1061 followed by the prefix used from other countries to dial this country.
1065 definition ends with the string
1066 .IR "END LC_TELEPHONE" .
1068 The definition starts with the string
1070 in the first column.
1072 The following keywords are allowed:
1075 followed by a list of abbreviated names of the days of the week.
1076 The list starts with the first day of the week
1079 (Sunday by default).
1083 followed by a list of names of the days of the week.
1084 The list starts with the first day of the week
1087 (Sunday by default).
1091 followed by a list of abbreviated month names.
1094 followed by a list of month names.
1097 followed by the appropriate date and time format
1102 followed by the appropriate date format
1107 followed by the appropriate time format
1112 followed by the appropriate representation of the
1117 This should be left empty for locales not using AM/PM convention.
1120 followed by the appropriate time format
1123 when using 12h clock format.
1124 This should be left empty for locales not using AM/PM convention.
1127 followed by semicolon-separated strings that define how years are
1128 counted and displayed for each era in the locale.
1129 Each string has the following format:
1132 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1134 The fields are to be defined as follows:
1143 means the years closer to
1145 have lower numbers than years closer to
1151 The number of the year closest to
1153 in the era, corresponding to the
1159 The start of the era in the form of
1161 Years prior AD 1 are represented as negative numbers.
1164 The end of the era in the form of
1166 or one of the two special values of
1171 means the ending date is the beginning of time.
1173 means the ending date is the end of time.
1176 The name of the era corresponding to the
1182 The format of the year in the era corresponding to the
1189 followed by the format of the date in alternative era notation,
1190 corresponding to the
1196 followed by the format of the time in alternative era notation,
1197 corresponding to the
1203 followed by the format of the date and time in alternative era notation,
1204 corresponding to the
1210 followed by the alternative digits used for date and time in the locale.
1213 followed by a list of three values as plain numbers:
1214 The number of days in a week (by default 7),
1215 a date of beginning of the week (by default corresponds to Sunday),
1216 and the minimal length of the first week in year (by default 4).
1217 Regarding the start of the week,
1219 shall be used for Sunday and
1221 shall be used for Monday.
1224 .IR first_weekday " (since glibc 2.2)"
1225 followed by the number of the first day from the
1227 list to be shown in calendar applications.
1228 The default value of
1230 (plain number) corresponds to either Sunday or Monday depending
1231 on the value of the second
1236 .IR first_workday " (since glibc 2.2)"
1237 followed by the number of the first working day from the
1240 The default value is
1246 .\" from localedata/locales/uk_UA
1247 followed by a plain number value that indicates the direction for the
1248 display of calendar dates, as follows:
1252 Left-right from top.
1258 Right-left from top.
1262 followed by the appropriate date representation for
1269 definition ends with the string
1273 .I /usr/lib/locale/locale-archive
1274 Usual default locale archive location.
1276 .I /usr/share/i18n/locales
1277 Usual default path for locale definition files.
1279 POSIX.2, ISO/IEC TR 14652.
1281 The collective GNU C library community wisdom regarding
1289 https://sourceware.org/glibc/wiki/Locales
1292 The value of the second
1294 list item specifies the base of the
1301 specifies the offset of the first day-of-week in the
1307 For compatibility reasons, all glibc locales should set the value of the
1312 (Sunday) and base the
1316 lists appropriately, and set
1324 depending on whether the week and work week actually starts on Sunday or
1325 Monday for the locale.
1327 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)