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-07-17 "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
176 Local township within town or city (since glibc 2.24).
179 Zip number, postal code.
185 State, province, or prefecture.
188 Country, as taken from data record.
190 Each field descriptor may have an \(aqR\(aq after
191 the \(aq%\(aq to specify that the
192 information is taken from a Romanized version string of the
197 followed by the country name in the language of the current document
198 (e.g., "Deutschland" for the
203 followed by the abbreviation of the country (see CERT_MAILCODES).
206 followed by the two-letter abbreviation of the country (ISO 3166).
209 followed by the three-letter abbreviation of the country (ISO 3166).
212 followed by the numeric country code as plain numbers (ISO 3166).
215 followed by the international licence plate country code.
218 followed by the ISBN code (for books).
221 followed by the language name in the language of the current document.
224 followed by the two-letter abbreviation of the language (ISO 639).
227 followed by the three-letter abbreviation of the language (ISO 639-2/T).
230 followed by the three-letter abbreviation of the language for library
232 Applications should in general prefer
239 definition ends with the string
240 .IR "END LC_ADDRESS" .
242 The definition starts with the string
246 The following keywords are allowed:
249 followed by a list of uppercase letters.
254 are included automatically.
255 Characters also specified as
264 followed by a list of lowercase letters.
269 are included automatically.
270 Characters also specified as
279 followed by a list of letters.
280 All character specified as either
284 are automatically included.
285 Characters also specified as
294 followed by the characters classified as numeric digits.
301 They are included by default in this class.
304 followed by a list of characters defined as white-space
306 Characters also specified as
319 .BR <carriage-return> ,
323 are automatically included.
326 followed by a list of control characters.
327 Characters also specified as
340 followed by a list of punctuation characters.
351 character are not allowed.
354 followed by a list of printable characters, not including the
357 The characters defined as
365 are automatically included.
366 Characters also specified as
371 followed by a list of printable characters, including the
374 The characters defined as
383 character are automatically included.
384 Characters also specified as
389 followed by a list of characters classified as hexadecimal
391 The decimal digits must be included followed by one or
392 more set of six characters in ascending order.
394 characters are included by default:
406 followed by a list of characters classified as
412 are automatically included.
415 followed by a list of locale-specific character class names
416 which are then to be defined in the locale.
419 followed by a list of mappings from lowercase to uppercase
421 Each mapping is a pair of a lowercase and an uppercase letter
424 and enclosed in parentheses.
425 The members of the list are separated
429 followed by a list of mappings from uppercase to lowercase
431 If the keyword tolower is not present, the reverse of the
432 toupper list is used.
435 followed by a list of mapping pairs of
436 characters and letters
437 to be used in titles (headings).
440 followed by a locale-specific character class definition,
441 starting with the class name followed by the characters
442 belonging to the class.
445 followed by a list of locale-specific character mapping names
446 which are then to be defined in the locale.
449 followed by a list of alternate output digits for the locale.
452 followed by a list of mapping pairs of
453 alternate digits and separators
454 for input digits for the locale.
457 followed by a list of mapping pairs of
459 for output for the locale.
462 marks the start of the transliteration rules section.
463 The section can contain the
465 keyword in the beginning followed by
466 locale-specific rules and overrides.
467 Any rule specified in the locale file
468 will override any rule
469 copied or included from other files.
470 In case of duplicate rule definitions in the locale file,
471 only the first rule is used.
473 A transliteration rule consist of a character to be transliterated
474 followed by a list of transliteration targets separated by semicolons.
475 The first target which can be presented in the target character set
476 is used, if none of them can be used the
478 character will be used instead.
481 in the transliteration rules section includes
482 a transliteration rule file
483 (and optionally a repertoire map file).
486 in the transliteration rules section
487 defines the default character to be used for
488 transliteration where none of the targets cannot be presented
489 in the target character set.
492 marks the end of the transliteration rules.
496 definition ends with the string
499 Note that glibc does not support all POSIX-defined options,
500 only the options described below are supported (as of glibc 2.23).
502 The definition starts with the string
506 The following keywords are allowed:
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.
523 to be evaluated in an
533 followed by a redefinition of a collation rule.
536 marks the end of the redefinition of a collation rule.
538 .I reorder-sections-after
539 followed by a script name to reorder listed scripts after.
541 .I reorder-sections-end
542 marks the end of the reordering of sections.
545 followed by a declaration of a script.
547 .I symbol-equivalence
548 followed by a collating-symbol to be equivalent to another defined
551 The collation rule definition starts with a line:
554 followed by a list of keywords chosen from
559 The order definition consists of lines that describe the collation
560 order and is terminated with the keyword
565 definition ends with the string
566 .IR "END LC_COLLATE" .
567 .SS LC_IDENTIFICATION
568 The definition starts with the string
572 The values in this category are defined as plain strings.
574 The following keywords are allowed:
577 followed by the title of the locale document
578 (e.g., "Maori language locale for New Zealand").
581 followed by the name of the organization that maintains this document.
584 followed by the address of the organization that maintains this document.
587 followed by the name of the contact person at
588 the organization that maintains this document.
591 followed by the email address of the person or
592 organization that maintains this document.
595 followed by the telephone number (in international format)
596 of the organization that maintains this document.
597 As of glibc 2.24, this keyword is deprecated in favor of
598 other contact methods.
601 followed by the fax number (in international format)
602 of the organization that maintains this document.
603 As of glibc 2.24, this keyword is deprecated in favor of
604 other contact methods.
607 followed by the name of the language to which this document applies.
610 followed by the name of the country/geographic extent
611 to which this document applies.
614 followed by a description of the audience for which this document is
618 followed by a description of any special application
619 for which this document is intended.
622 followed by the short name for provider of the source of this document.
625 followed by the revision number of this document.
628 followed by the revision date of this document.
630 In addition, for each of the categories defined by the document,
631 there should be a line starting with the keyword
635 a string that identifies this locale category definition,
645 definition ends with the string
646 .IR "END LC_IDENTIFICATION" .
648 The definition starts with the string
652 The following keywords are allowed:
655 followed by a regular expression that describes possible
659 followed by a regular expression that describes possible
663 followed by the output string corresponding to "yes".
666 followed by the output string corresponding to "no".
670 definition ends with the string
671 .IR "END LC_MESSAGES" .
673 The definition starts with the string
677 The following keywords are allowed:
680 followed by number identifying the standard used for measurement.
681 The following values are recognized:
688 US customary measurements.
693 definition ends with the string
694 .IR "END LC_MEASUREMENT" .
696 The definition starts with the string
701 .IR int_curr_symbol ,
702 .IR currency_symbol ,
703 .IR mon_decimal_point ,
704 .IR mon_thousands_sep ,
708 are defined as Unicode code points, the others as plain numbers.
710 The following keywords are allowed:
713 followed by the international currency symbol.
715 4-character string containing the international currency symbol as
716 defined by the ISO 4217 standard (three characters) followed by a
720 followed by the local currency symbol.
723 followed by the string that will be used as the decimal delimiter
724 when formatting monetary quantities.
727 followed by the string that will be used as a group separator
728 when formatting monetary quantities.
731 followed by a sequence of integers separated by semicolons that
732 describe the formatting of monetary quantities.
738 followed by a string that is used to indicate a positive sign for
742 followed by a string that is used to indicate a negative sign for
746 followed by the number of fractional digits that should be used when
748 .IR int_curr_symbol .
751 followed by the number of fractional digits that should be used when
753 .IR currency_symbol .
756 followed by an integer that indicates the placement of
758 for a nonnegative formatted monetary quantity:
762 the symbol succeeds the value.
765 the symbol precedes the value.
769 followed by an integer that indicates the separation of
770 .IR currency_symbol ,
771 the sign string, and the value for a nonnegative formatted monetary quantity.
772 The following values are recognized:
776 No space separates the currency symbol and the value.
779 If the currency symbol and the sign string are adjacent,
780 a space separates them from the value;
781 otherwise a space separates the currency symbol and the value.
784 If the currency symbol and the sign string are adjacent,
785 a space separates them from the value;
786 otherwise a space separates the sign string and the value.
790 followed by an integer that indicates the placement of
792 for a negative formatted monetary quantity.
793 The same values are recognized as for
797 followed by an integer that indicates the separation of
798 .IR currency_symbol ,
799 the sign string, and the value for a negative formatted monetary quantity.
800 The same values are recognized as for
804 followed by an integer that indicates where the
806 should be placed for a nonnegative monetary quantity:
810 Parentheses enclose the quantity and the
813 .IR int_curr_symbol .
816 The sign string precedes the quantity and the
819 .IR int_curr_symbol .
822 The sign string succeeds the quantity and the
825 .IR int_curr_symbol .
828 The sign string precedes the
831 .IR int_curr_symbol .
834 The sign string succeeds the
837 .IR int_curr_symbol .
841 followed by an integer that indicates where the
843 should be placed for a negative monetary quantity.
844 The same values are recognized as for
848 followed by an integer that indicates the placement of
850 for a nonnegative internationally formatted monetary quantity.
851 The same values are recognized as for
855 followed by an integer that indicates the placement of
857 for a negative internationally formatted monetary quantity.
858 The same values are recognized as for
861 .I int_p_sep_by_space
862 followed by an integer that indicates the separation of
863 .IR int_curr_symbol ,
865 and the value for a nonnegative internationally formatted monetary quantity.
866 The same values are recognized as for
869 .I int_n_sep_by_space
870 followed by an integer that indicates the separation of
871 .IR int_curr_symbol ,
873 and the value for a negative internationally formatted monetary quantity.
874 The same values are recognized as for
878 followed by an integer that indicates where the
880 should be placed for a nonnegative
881 internationally formatted monetary quantity.
882 The same values are recognized as for
886 followed by an integer that indicates where the
888 should be placed for a negative
889 internationally formatted monetary quantity.
890 The same values are recognized as for
895 definition ends with the string
896 .IR "END LC_MONETARY" .
898 The definition starts with the string
902 Various keywords are allowed, but only
905 Other keywords are needed only if there is common convention to
906 use the corresponding salutation in this locale.
907 The allowed keywords are as follows:
910 followed by a string containing field descriptors that define
911 the format used for names in the locale.
912 The following field descriptors are recognized:
913 .\" From localedata/locales/uk_UA
920 Family names in uppercase.
929 First given name with Latin letters.
935 Additional given name(s).
938 Initials for additional given name(s).
944 Salutation, such as "Doctor".
947 Abbreviated salutation, such as "Mr." or "Dr.".
950 Salutation, 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
962 If the preceding field descriptor resulted in an empty string,
963 then the empty string, otherwise a space character.
967 followed by the general salutation for any gender.
970 followed by the salutation for men.
973 followed by the salutation for married women.
976 followed by the salutation for unmarried women.
979 followed by the salutation valid for all women.
983 definition ends with the string
986 The definition starts with the string
990 The following keywords are allowed:
993 followed by the string that will be used as the decimal delimiter
994 when formatting numeric quantities.
997 followed by the string that will be used as a group separator
998 when formatting numeric quantities.
1001 followed by a sequence of integers as plain numbers separated by
1002 semicolons that describe the formatting of numeric quantities.
1004 Each integer specifies the number of digits in a group.
1005 The first integer defines the size of the group immediately
1006 to the left of the decimal delimiter.
1007 Subsequent integers define succeeding groups to the
1008 left of the previous group.
1009 If 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.
1011 If the last integer is \-1, then no further grouping is performed.
1015 definition ends with the string
1016 .IR "END LC_NUMERIC" .
1018 The definition starts with the string
1020 in the first column.
1022 Values in this category are defined as plain numbers.
1024 The following keywords are allowed:
1027 followed by the height, in millimeters, of the standard paper format.
1030 followed by the width, in millimeters, of the standard paper format.
1034 definition ends with the string
1035 .IR "END LC_PAPER" .
1037 The definition starts with the string
1039 in the first column.
1041 The following keywords are allowed:
1044 followed by a string that contains field descriptors that identify
1045 the format used to dial international numbers.
1046 The following field descriptors are recognized:
1047 .\" From localedata/locales/uk_UA
1051 Area code without nationwide prefix (the prefix is often "00").
1054 Area code including nationwide prefix.
1057 Local number (within area code).
1060 Extension (to local number).
1066 Alternate carrier service code used for dialing abroad.
1069 If the preceding field descriptor resulted in an empty string,
1070 then the empty string, otherwise a space character.
1074 followed by a string that contains field descriptors that identify
1075 the format used to dial domestic numbers.
1076 The recognized field descriptors are the same as for
1080 followed by the prefix used to call international phone numbers.
1083 followed by the prefix used from other countries to dial this country.
1087 definition ends with the string
1088 .IR "END LC_TELEPHONE" .
1090 The definition starts with the string
1092 in the first column.
1094 The following keywords are allowed:
1097 followed by a list of abbreviated names of the days of the week.
1098 The list starts with the first day of the week
1101 (Sunday by default).
1105 followed by a list of names of the days of the week.
1106 The list starts with the first day of the week
1109 (Sunday by default).
1113 followed by a list of abbreviated month names.
1116 followed by a list of month names.
1119 followed by the appropriate date and time format
1124 followed by the appropriate date format
1129 followed by the appropriate time format
1134 followed by the appropriate representation of the
1139 This should be left empty for locales not using AM/PM convention.
1142 followed by the appropriate time format
1145 when using 12h clock format.
1146 This should be left empty for locales not using AM/PM convention.
1149 followed by semicolon-separated strings that define how years are
1150 counted and displayed for each era in the locale.
1151 Each string has the following format:
1154 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1156 The fields are to be defined as follows:
1165 means the years closer to
1167 have lower numbers than years closer to
1173 The number of the year closest to
1175 in the era, corresponding to the
1181 The start of the era in the form of
1183 Years prior AD 1 are represented as negative numbers.
1186 The end of the era in the form of
1188 or one of the two special values of
1193 means the ending date is the beginning of time.
1195 means the ending date is the end of time.
1198 The name of the era corresponding to the
1204 The format of the year in the era corresponding to the
1211 followed by the format of the date in alternative era notation,
1212 corresponding to the
1218 followed by the format of the time in alternative era notation,
1219 corresponding to the
1225 followed by the format of the date and time in alternative era notation,
1226 corresponding to the
1232 followed by the alternative digits used for date and time in the locale.
1235 followed by a list of three values as plain numbers:
1236 The number of days in a week (by default 7),
1237 a date of beginning of the week (by default corresponds to Sunday),
1238 and the minimal length of the first week in year (by default 4).
1239 Regarding the start of the week,
1241 shall be used for Sunday and
1243 shall be used for Monday.
1246 .IR first_weekday " (since glibc 2.2)"
1247 followed by the number of the first day from the
1249 list to be shown in calendar applications.
1250 The default value of
1252 (plain number) corresponds to either Sunday or Monday depending
1253 on the value of the second
1258 .IR first_workday " (since glibc 2.2)"
1259 followed by the number of the first working day from the
1262 The default value is
1268 .\" From localedata/locales/uk_UA
1269 followed by a plain number value that indicates the direction for the
1270 display of calendar dates, as follows:
1274 Left-right from top.
1280 Right-left from top.
1284 followed by the appropriate date representation for
1291 definition ends with the string
1295 .I /usr/lib/locale/locale-archive
1296 Usual default locale archive location.
1298 .I /usr/share/i18n/locales
1299 Usual default path for locale definition files.
1303 The collective GNU C library community wisdom regarding
1311 https://sourceware.org/glibc/wiki/Locales
1314 The value of the second
1316 list item specifies the base of the
1323 specifies the offset of the first day-of-week in the
1329 For compatibility reasons, all glibc locales should set the value of the
1334 (Sunday) and base the
1338 lists appropriately, and set
1346 depending on whether the week and work week actually starts on Sunday or
1347 Monday for the locale.
1349 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)