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 .\" From 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:
133 Person's name, possibly constructed with the
136 keyword (since glibc 2.24).
139 Care of person, or organization.
151 Street or block (e.g., Japanese) name.
154 House number or designation.
157 Insert an end-of-line if the previous descriptor's value was not an empty
158 string; otherwise ignore.
161 Insert a space if the previous descriptor's value was not an empty string;
165 Room number, door designation.
171 Country designation, from the <country_post> keyword.
174 Local township within town or city (since glibc 2.24).
177 Zip number, postal code.
183 State, province, or prefecture.
186 Country, as taken from data record.
188 Each field descriptor may have an \(aqR\(aq after
189 the \(aq%\(aq to specify that the
190 information is taken from a Romanized version string of the
195 followed by the country name in the language of the current document
196 (e.g., "Deutschland" for the
201 followed by the abbreviation of the country (see CERT_MAILCODES).
204 followed by the two-letter abbreviation of the country (ISO 3166).
207 followed by the three-letter abbreviation of the country (ISO 3166).
210 followed by the numeric country code as plain numbers (ISO 3166).
213 followed by the international licence plate country code.
216 followed by the ISBN code (for books).
219 followed by the language name in the language of the current document.
222 followed by the two-letter abbreviation of the language (ISO 639).
225 followed by the three-letter abbreviation of the language (ISO 639-2/T).
228 followed by the three-letter abbreviation of the language for library
230 Applications should in general prefer
237 definition ends with the string
238 .IR "END LC_ADDRESS" .
240 The definition starts with the string
244 The following keywords are allowed:
247 followed by a list of uppercase letters.
252 are included automatically.
253 Characters also specified as
262 followed by a list of lowercase letters.
267 are included automatically.
268 Characters also specified as
277 followed by a list of letters.
278 All character specified as either
282 are automatically included.
283 Characters also specified as
292 followed by the characters classified as numeric digits.
299 They are included by default in this class.
302 followed by a list of characters defined as white-space
304 Characters also specified as
317 .BR <carriage-return> ,
321 are automatically included.
324 followed by a list of control characters.
325 Characters also specified as
338 followed by a list of punctuation characters.
349 character are not allowed.
352 followed by a list of printable characters, not including the
355 The characters defined as
363 are automatically included.
364 Characters also specified as
369 followed by a list of printable characters, including the
372 The characters defined as
381 character are automatically included.
382 Characters also specified as
387 followed by a list of characters classified as hexadecimal
389 The decimal digits must be included followed by one or
390 more set of six characters in ascending order.
392 characters are included by default:
404 followed by a list of characters classified as
410 are automatically included.
413 followed by a list of locale-specific character class names
414 which are then to be defined in the locale.
417 followed by a list of mappings from lowercase to uppercase
419 Each mapping is a pair of a lowercase and an uppercase letter
422 and enclosed in parentheses.
423 The members of the list are separated
427 followed by a list of mappings from uppercase to lowercase
429 If the keyword tolower is not present, the reverse of the
430 toupper list is used.
433 followed by a list of mapping pairs of
434 characters and letters
435 to be used in titles (headings).
438 followed by a locale-specific character class definition,
439 starting with the class name followed by the characters
440 belonging to the class.
443 followed by a list of locale-specific character mapping names
444 which are then to be defined in the locale.
447 followed by a list of alternate output digits for the locale.
450 followed by a list of mapping pairs of
451 alternate digits and separators
452 for input digits for the locale.
455 followed by a list of mapping pairs of
457 for output for the locale.
460 marks the start of the transliteration rules section.
461 The section can contain the
463 keyword in the beginning followed by
464 locale-specific rules and overrides.
465 Any rule specified in the locale file
466 will override any rule
467 copied or included from other files.
468 In case of duplicate rule definitions in the locale file,
469 only the first rule is used.
471 A transliteration rule consist of a character to be transliterated
472 followed by a list of transliteration targets separated by semicolons.
473 The first target which can be presented in the target character set
474 is used, if none of them can be used the
476 character will be used instead.
479 in the transliteration rules section includes
480 a transliteration rule file
481 (and optionally a repertoire map file).
484 in the transliteration rules section
485 defines the default character to be used for
486 transliteration where none of the targets cannot be presented
487 in the target character set.
490 marks the end of the transliteration rules.
494 definition ends with the string
497 Note that glibc does not support all POSIX-defined options,
498 only the options described below are supported (as of glibc 2.23).
500 The definition starts with the string
504 The following keywords are allowed:
505 .\" FIXME The following glibc LC_COLLATE keywords are not documented:
509 followed by the number representing used collation levels.
510 This keyword is recognized but ignored by glibc.
513 followed by the definition of a collating-element symbol
514 representing a multicharacter collating element.
517 followed by the definition of a collating symbol
518 that can be used in collation order statements.
521 followed by a redefinition of a collation rule.
524 marks the end of the redefinition of a collation rule.
527 followed by a section of collation order statements.
530 followed by a section symbol representing a set of collation order
533 .I symbol-equivalence
534 followed by a collating-symbol to be equivalent to another defined
537 The collation rule definition starts with a line:
540 followed by a list of keywords chosen from
545 The order definition consists of lines that describe the collation
546 order and is terminated with the keyword
551 definition ends with the string
552 .IR "END LC_COLLATE" .
553 .SS LC_IDENTIFICATION
554 The definition starts with the string
558 The values in this category are defined as plain strings.
560 The following keywords are allowed:
563 followed by the title of the locale document
564 (e.g., "Maori language locale for New Zealand").
567 followed by the name of the organization that maintains this document.
570 followed by the address of the organization that maintains this document.
573 followed by the name of the contact person at
574 the organization that maintains this document.
577 followed by the email address of the person or
578 organization that maintains this document.
581 followed by the telephone number (in international format)
582 of the organization that maintains this document.
583 As of glibc 2.24, this keyword is deprecated in favor of
584 other contact methods.
587 followed by the fax number (in international format)
588 of the organization that maintains this document.
589 As of glibc 2.24, this keyword is deprecated in favor of
590 other contact methods.
593 followed by the name of the language to which this document applies.
596 followed by the name of the country/geographic extent
597 to which this document applies.
600 followed by a description of the audience for which this document is intended.
603 followed by a description of any special application
604 for which this document is intended.
607 followed by the short name for provider of the source of this document.
610 followed by the revision number of this document.
613 followed by the revision date of this document.
615 In addition, for each of the categories defined by the document,
616 there should be a line starting with the keyword
620 a string that identifies this locale category definition,
630 definition ends with the string
631 .IR "END LC_IDENTIFICATION" .
633 The definition starts with the string
637 The following keywords are allowed:
640 followed by a regular expression that describes possible
644 followed by a regular expression that describes possible
648 followed by the output string corresponding to "yes".
651 followed by the output string corresponding to "no".
655 definition ends with the string
656 .IR "END LC_MESSAGES" .
658 The definition starts with the string
662 The following keywords are allowed:
665 followed by number identifying the standard used for measurement.
666 The following values are recognized:
673 US customary measurements.
678 definition ends with the string
679 .IR "END LC_MEASUREMENT" .
681 The definition starts with the string
686 .IR int_curr_symbol ,
687 .IR currency_symbol ,
688 .IR mon_decimal_point ,
689 .IR mon_thousands_sep ,
693 are defined as Unicode code points, the others as plain numbers.
695 The following keywords are allowed:
698 followed by the international currency symbol.
700 4-character string containing the international currency symbol as
701 defined by the ISO 4217 standard (three characters) followed by a
705 followed by the local currency symbol.
708 followed by the string that will be used as the decimal delimiter
709 when formatting monetary quantities.
712 followed by the string that will be used as a group separator
713 when formatting monetary quantities.
716 followed by a sequence of integers separated by semicolons that
717 describe the formatting of monetary quantities.
723 followed by a string that is used to indicate a positive sign for
727 followed by a string that is used to indicate a negative sign for
731 followed by the number of fractional digits that should be used when
733 .IR int_curr_symbol .
736 followed by the number of fractional digits that should be used when
738 .IR currency_symbol .
741 followed by an integer that indicates the placement of
743 for a nonnegative formatted monetary quantity:
747 the symbol succeeds the value.
750 the symbol precedes the value.
754 followed by an integer that indicates the separation of
755 .IR currency_symbol ,
756 the sign string, and the value for a nonnegative formatted monetary quantity.
757 The following values are recognized:
761 No space separates the currency symbol and the value.
764 If the currency symbol and the sign string are adjacent,
765 a space separates them from the value;
766 otherwise a space separates the currency symbol and the value.
769 If the currency symbol and the sign string are adjacent,
770 a space separates them from the value;
771 otherwise a space separates the sign string and the value.
775 followed by an integer that indicates the placement of
777 for a negative formatted monetary quantity.
778 The same values are recognized as for
782 followed by an integer that indicates the separation of
783 .IR currency_symbol ,
784 the sign string, and the value for a negative formatted monetary quantity.
785 The same values are recognized as for
789 followed by an integer that indicates where the
791 should be placed for a nonnegative monetary quantity:
795 Parentheses enclose the quantity and the
798 .IR int_curr_symbol .
801 The sign string precedes the quantity and the
804 .IR int_curr_symbol .
807 The sign string succeeds the quantity and the
810 .IR int_curr_symbol .
813 The sign string precedes the
816 .IR int_curr_symbol .
819 The sign string succeeds the
822 .IR int_curr_symbol .
826 followed by an integer that indicates where the
828 should be placed for a negative 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 nonnegative internationally formatted monetary quantity.
836 The same values are recognized as for
840 followed by an integer that indicates the placement of
841 .I int_currency_symbol
842 for a negative internationally formatted monetary quantity.
843 The same values are recognized as for
846 .I int_p_sep_by_space
847 followed by an integer that indicates the separation of
848 .IR int_currency_symbol ,
850 and the value for a nonnegative internationally formatted monetary quantity.
851 The same values are recognized as for
854 .I int_n_sep_by_space
855 followed by an integer that indicates the separation of
856 .IR int_currency_symbol ,
858 and the value for a negative internationally formatted monetary quantity.
859 The same values are recognized as for
863 followed by an integer that indicates where the
865 should be placed for a nonnegative
866 internationally formatted monetary quantity.
867 The same values are recognized as for
871 followed by an integer that indicates where the
873 should be placed for a negative
874 internationally formatted monetary quantity.
875 The same values are recognized as for
880 definition ends with the string
881 .IR "END LC_MONETARY" .
883 The definition starts with the string
887 Various keywords are allowed, but only
890 Other keywords are needed only if there is common convention to
891 use the corresponding salutation in this locale.
892 The allowed keywords are as follows:
895 followed by a string containing field descriptors that define
896 the format used for names in the locale.
897 The following field descriptors are recognized:
898 .\" From localedata/locales/uk_UA
905 Family names in uppercase.
914 First given name with Latin letters.
920 Additional given name(s).
923 Initials for additional given name(s).
929 Salutation, such as "Doctor".
932 Abbreviated salutation, such as "Mr." or "Dr.".
935 Salutation, using the FDCC-sets conventions.
936 .\" 1 for the name_gen
937 .\" In glibc 2.19, %d1 is used in only:
938 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
939 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
940 .\" In glibc 2.19, %d[2-5] appear to be not used at all
947 If the preceding field descriptor resulted in an empty string,
948 then the empty string, otherwise a space character.
952 followed by the general salutation for any gender.
955 followed by the salutation for men.
958 followed by the salutation for married women.
961 followed by the salutation for unmarried women.
964 followed by the salutation valid for all women.
968 definition ends with the string
971 The definition starts with the string
975 The following keywords are allowed:
978 followed by the string that will be used as the decimal delimiter
979 when formatting numeric quantities.
982 followed by the string that will be used as a group separator
983 when formatting numeric quantities.
986 followed by a sequence of integers as plain numbers separated by
987 semicolons that describe the formatting of numeric quantities.
989 Each integer specifies the number of digits in a group.
990 The first integer defines the size of the group immediately
991 to the left of the decimal delimiter.
992 Subsequent integers define succeeding groups to the
993 left of the previous group.
994 If the last integer is not \-1, then the size of the previous group
995 (if any) is repeatedly used for the remainder of the digits.
996 If the last integer is \-1, then no further grouping is performed.
1000 definition ends with the string
1001 .IR "END LC_NUMERIC" .
1003 The definition starts with the string
1005 in the first column.
1007 Values in this category are defined as plain numbers.
1009 The following keywords are allowed:
1012 followed by the height, in millimeters, of the standard paper format.
1015 followed by the width, in millimeters, of the standard paper format.
1019 definition ends with the string
1020 .IR "END LC_PAPER" .
1022 The definition starts with the string
1024 in the first column.
1026 The following keywords are allowed:
1029 followed by a string that contains field descriptors that identify
1030 the format used to dial international numbers.
1031 The following field descriptors are recognized:
1032 .\" From localedata/locales/uk_UA
1036 Area code without nationwide prefix (the prefix is often "00").
1039 Area code including nationwide prefix.
1042 Local number (within area code).
1045 Extension (to local number).
1051 Alternate carrier service code used for dialing abroad.
1054 If the preceding field descriptor resulted in an empty string,
1055 then the empty string, otherwise a space character.
1059 followed by a string that contains field descriptors that identify
1060 the format used to dial domestic numbers.
1061 The recognized field descriptors are the same as for
1065 followed by the prefix used to call international phone numbers.
1068 followed by the prefix used from other countries to dial this country.
1072 definition ends with the string
1073 .IR "END LC_TELEPHONE" .
1075 The definition starts with the string
1077 in the first column.
1079 The following keywords are allowed:
1082 followed by a list of abbreviated names of the days of the week.
1083 The list starts with the first day of the week
1086 (Sunday by default).
1090 followed by a list of names of the days of the week.
1091 The list starts with the first day of the week
1094 (Sunday by default).
1098 followed by a list of abbreviated month names.
1101 followed by a list of month names.
1104 followed by the appropriate date and time format
1109 followed by the appropriate date format
1114 followed by the appropriate time format
1119 followed by the appropriate representation of the
1124 This should be left empty for locales not using AM/PM convention.
1127 followed by the appropriate time format
1130 when using 12h clock format.
1131 This should be left empty for locales not using AM/PM convention.
1134 followed by semicolon-separated strings that define how years are
1135 counted and displayed for each era in the locale.
1136 Each string has the following format:
1139 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1141 The fields are to be defined as follows:
1150 means the years closer to
1152 have lower numbers than years closer to
1158 The number of the year closest to
1160 in the era, corresponding to the
1166 The start of the era in the form of
1168 Years prior AD 1 are represented as negative numbers.
1171 The end of the era in the form of
1173 or one of the two special values of
1178 means the ending date is the beginning of time.
1180 means the ending date is the end of time.
1183 The name of the era corresponding to the
1189 The format of the year in the era corresponding to the
1196 followed by the format of the date in alternative era notation,
1197 corresponding to the
1203 followed by the format of the time in alternative era notation,
1204 corresponding to the
1210 followed by the format of the date and time in alternative era notation,
1211 corresponding to the
1217 followed by the alternative digits used for date and time in the locale.
1220 followed by a list of three values as plain numbers:
1221 The number of days in a week (by default 7),
1222 a date of beginning of the week (by default corresponds to Sunday),
1223 and the minimal length of the first week in year (by default 4).
1224 Regarding the start of the week,
1226 shall be used for Sunday and
1228 shall be used for Monday.
1231 .IR first_weekday " (since glibc 2.2)"
1232 followed by the number of the first day from the
1234 list to be shown in calendar applications.
1235 The default value of
1237 (plain number) corresponds to either Sunday or Monday depending
1238 on the value of the second
1243 .IR first_workday " (since glibc 2.2)"
1244 followed by the number of the first working day from the
1247 The default value is
1253 .\" From localedata/locales/uk_UA
1254 followed by a plain number value that indicates the direction for the
1255 display of calendar dates, as follows:
1259 Left-right from top.
1265 Right-left from top.
1269 followed by the appropriate date representation for
1276 definition ends with the string
1280 .I /usr/lib/locale/locale-archive
1281 Usual default locale archive location.
1283 .I /usr/share/i18n/locales
1284 Usual default path for locale definition files.
1286 POSIX.2, ISO/IEC TR 14652.
1288 The collective GNU C library community wisdom regarding
1296 https://sourceware.org/glibc/wiki/Locales
1299 The value of the second
1301 list item specifies the base of the
1308 specifies the offset of the first day-of-week in the
1314 For compatibility reasons, all glibc locales should set the value of the
1319 (Sunday) and base the
1323 lists appropriately, and set
1331 depending on whether the week and work week actually starts on Sunday or
1332 Monday for the locale.
1334 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)