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-06-13 "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 The following LC_CTYPE keywords are not documented:
221 .\" translit_start + translit_end
226 .\" map (to_inpunct, to_outpunct)
229 followed by a list of uppercase letters.
234 are included automatically.
235 Characters also specified as
244 followed by a list of lowercase letters.
249 are included automatically.
250 Characters also specified as
259 followed by a list of letters.
260 All character specified as either
264 are automatically included.
265 Characters also specified as
274 followed by the characters classified as numeric digits.
281 They are included by default in this class.
284 followed by a list of characters defined as white-space
286 Characters also specified as
299 .BR <carriage-return> ,
303 are automatically included.
306 followed by a list of control characters.
307 Characters also specified as
320 followed by a list of punctuation characters.
331 character are not allowed.
334 followed by a list of printable characters, not including the
337 The characters defined as
345 are automatically included.
346 Characters also specified as
351 followed by a list of printable characters, including the
354 The characters defined as
363 character are automatically included.
364 Characters also specified as
369 followed by a list of characters classified as hexadecimal
371 The decimal digits must be included followed by one or
372 more set of six characters in ascending order.
374 characters are included by default:
386 followed by a list of characters classified as
392 are automatically included.
395 followed by a list of mappings from lowercase to uppercase
397 Each mapping is a pair of a lowercase and an uppercase letter
400 and enclosed in parentheses.
401 The members of the list are separated
405 followed by a list of mappings from uppercase to lowercase
407 If the keyword tolower is not present, the reverse of the
408 toupper list is used.
412 definition ends with the string
415 .\" FIXME The description of LC_COLLATE lacks a lot of details
418 category defines the rules for collating characters.
420 limitations of libc not all POSIX-options are implemented.
422 The definition starts with the string
426 The following keywords are allowed:
427 .\" FIXME The following LC_COLLATE keywords are not documented:
429 .\" symbol-equivalence
432 followed by the definition of a collating-element symbol
433 representing a multicharacter collating element.
436 followed by the definition of a collating symbol
437 that can be used in collation order statements.
439 The order-definition starts with a line:
442 followed by a list of keywords chosen from
447 The order definition consists of lines that describe the order
448 and is terminated with the keyword
450 .\" FIXME The following LC_COLLATE keywords are not documented:
453 .\" reorder-sections-after
454 .\" reorder-sections-end
458 definition ends with the string
459 .IR "END LC_COLLATE" .
460 .SS LC_IDENTIFICATION
461 This category contains meta-information about the locale definition.
463 The definition starts with the string
467 The following keywords are allowed:
470 followed by the title of the locale document
471 (e.g., "Maori language locale for New Zealand").
474 followed by the name of the organization that maintains this document.
477 followed by the address of the organization that maintains this document.
480 followed by the name of the contact person at
481 the organization that maintains this document.
484 followed by the email address of the person or
485 organization that maintains this document.
488 followed by the telephone number (in international format)
489 of the organization that maintains this document.
492 followed by the fax number (in international format)
493 of the organization that maintains this document.
496 followed by the name of the language to which this document applies.
499 followed by the name of the country/geographic extent
500 to which this document applies.
503 followed by a description of the audience for which this document is intended.
506 followed by a description of any special application
507 for which this document is intended.
510 .\" as far as I can tell... (mtk)
511 followed by the short name for this document.
514 followed by the revision number of this document.
517 followed by the revision date of this document.
519 In addition, for each of the categories defined by the document,
520 there should be a line starting with the keyword
524 a string that identifies this locale category definition,
534 definition ends with the string
535 .IR "END LC_IDENTIFICATION" .
537 The definition starts with the string
541 The following keywords are allowed:
544 followed by a regular expression that describes possible
548 followed by a regular expression that describes possible
552 followed by the output string corresponding to "yes".
555 followed by the output string corresponding to "no".
559 definition ends with the string
560 .IR "END LC_MESSAGES" .
562 The definition starts with the string
566 The following keywords are allowed:
569 followed by number identifying the standard used for measurement.
570 The following values are recognized:
577 US customary measurements.
582 definition ends with the string
583 .IR "END LC_MEASUREMENT" .
585 The definition starts with the string
589 The following keywords are allowed:
592 followed by the international currency symbol.
594 4-character string containing the international currency symbol as
595 defined by the ISO 4217 standard (three characters) followed by a
599 followed by the local currency symbol.
602 followed by the string that will be used as the decimal delimiter
603 when formatting monetary quantities.
606 followed by the string that will be used as a group separator
607 when formatting monetary quantities.
610 followed by a sequence of integers separated by semicolons that
611 describe the formatting of monetary quantities.
617 followed by a string that is used to indicate a positive sign for
621 followed by a string that is used to indicate a negative sign for
625 followed by the number of fractional digits that should be used when
627 .IR int_curr_symbol .
630 followed by the number of fractional digits that should be used when
632 .IR currency_symbol .
635 followed by an integer that indicates the placement of
637 for a nonnegative formatted monetary quantity:
641 the symbol succeeds the value.
644 the symbol precedes the value.
648 followed by an integer that indicates the placement of
650 for a negative formatted monetary quantity.
651 The same values are recognized as for
655 followed by an integer that indicates the placement of
656 .I int_currency_symbol
657 for a nonnegative internationally formatted monetary quantity.
658 The same values are recognized as for
662 followed by an integer that indicates the placement of
663 .I int_currency_symbol
664 for a negative internationally formatted monetary quantity.
665 The same values are recognized as for
669 followed by an integer that indicates the separation of
670 .IR currency_symbol ,
671 the sign string, and the value for a nonnegative formatted monetary quantity.
672 The following values are recognized:
676 No space separates the currency symbol and the value.
679 If the currency symbol and the sign string are adjacent,
680 a space separates them from the value;
681 otherwise a space separates the currency symbol and the value.
684 If the currency symbol and the sign string are adjacent,
685 a space separates them from the value;
686 otherwise a space separates the sign string and the value.
690 followed by an integer that indicates the separation of
691 .IR currency_symbol ,
692 the sign string, and the value for a negative formatted monetary quantity.
693 The same values are recognized as for
696 .I int_p_sep_by_space
697 followed by an integer that indicates the separation of
698 .IR int_currency_symbol ,
700 and the value for a nonnegative internationally formatted monetary quantity.
701 The same values are recognized as for
704 .I int_n_sep_by_space
705 followed by an integer that indicates the separation of
706 .IR int_currency_symbol ,
708 and the value for a negative internationally formatted monetary quantity.
709 The same values are recognized as for
713 followed by an integer that indicates where the
715 should be placed for a nonnegative monetary quantity:
719 Parentheses enclose the quantity and the
722 .IR int_curr_symbol .
725 The sign string precedes the quantity and the
728 .IR int_curr_symbol .
731 The sign string succeeds the quantity and the
734 .IR int_curr_symbol .
737 The sign string precedes the
740 .IR int_curr_symbol .
743 The sign string succeeds the
746 .IR int_curr_symbol .
750 followed by an integer that indicates where the
752 should be placed for a negative monetary quantity.
753 The same values are recognized as for
757 followed by an integer that indicates where the
759 should be placed for a nonnegative
760 internationally formatted monetary quantity.
761 The same values are recognized as for
765 followed by an integer that indicates where the
767 should be placed for a negative
768 internationally formatted monetary quantity.
769 The same values are recognized as for
774 definition ends with the string
775 .IR "END LC_MONETARY" .
777 The definition starts with the string
781 Various keywords are allowed, but only
784 Other keywords are needed only if there is common convention to
785 use the corresponding salutation in this locale.
786 The allowed keywords are as follows:
789 followed by a string containing field descriptors that define
790 the format used for names in the locale.
791 The following field descriptors are recognized:
792 .\" From localedata/locales/uk_UA:
799 Family names in uppercase.
808 First given name with Latin letters.
814 Additional given name(s).
817 Initials for additional given name(s).
823 Salutation, such as "Doctor".
826 Abbreviated salutation, such as "Mr." or "Dr.".
829 Salutation, using the FDCC-sets conventions.
830 .\" 1 for the name_gen
831 .\" In glibc 2.19, %d1 is used in only:
832 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
833 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
834 .\" In glibc 2.19, %d[2-5] appear to be not used at all
841 If the preceding field descriptor resulted in an empty string,
842 then the empty string, otherwise a space character.
846 followed by the general salutation for any gender.
849 followed by the salutation for men.
852 followed by the salutation for married women.
855 followed by the salutation for unmarried women.
858 followed by the salutation valid for all women.
862 definition ends with the string
865 The definition starts with the string
869 The following keywords are allowed:
872 followed by the string that will be used as the decimal delimiter
873 when formatting numeric quantities.
876 followed by the string that will be used as a group separator
877 when formatting numeric quantities.
880 followed by a sequence of integers separated by semicolons that
881 describe the formatting of numeric quantities.
883 Each integer specifies the number of digits in a group.
884 The first integer defines the size of the group immediately
885 to the left of the decimal delimiter.
886 Subsequent integers define succeeding groups to the
887 left of the previous group.
888 If the last integer is not \-1, then the size of the previous group
889 (if any) is repeatedly used for the remainder of the digits.
890 If the last integer is \-1, then no further grouping is performed.
894 definition ends with the string
895 .IR "END LC_NUMERIC" .
897 The definition starts with the string
901 The following keywords are allowed:
904 followed by the height, in millimeters, of the standard paper format.
907 followed by the width, in millimeters, of the standard paper format.
911 definition ends with the string
914 The definition starts with the string
918 The following keywords are allowed:
921 followed by a string that contains field descriptors that identify
922 the format used to dial international numbers.
923 The following field descriptors are recognized:
924 .\" From localedata/locales/uk_UA
928 Area code without nationwide prefix (the prefix is often "00").
931 Area code including nationwide prefix.
934 Local number (within area code).
937 Extension (to local number).
943 Alternate carrier service code used for dialing abroad.
946 If the preceding field descriptor resulted in an empty string,
947 then the empty string, otherwise a space character.
951 followed by a string that contains field descriptors that identify
952 the format used to dial domestic numbers.
953 The recognized field descriptors are the same as for
957 followed by the prefix used to call international phone numbers.
960 followed by the prefix used from other countries to dial this country.
964 definition ends with the string
965 .IR "END LC_TELEPHONE" .
967 The definition starts with the string
971 The following keywords are allowed:
972 .\" FIXME The following LC_TIME keywords are not documented:
980 followed by a list of abbreviated names of the days of the week.
981 The list starts with the first day of the week
988 followed by a list of names of the days of the week.
989 The list starts with the first day of the week
996 followed by a list of abbreviated month names.
999 followed by a list of month names.
1002 followed by the appropriate representation of the
1007 This should be left empty for locales not using AM/PM convention.
1010 followed by the appropriate date and time format.
1013 followed by the appropriate date format.
1016 followed by the appropriate time format.
1019 followed by the appropriate time format when using 12h clock format.
1020 This should be left empty for locales not using AM/PM convention.
1023 followed by a list of three values:
1024 The number of days in a week (by default 7),
1025 a date of beginning of the week (by default corresponds to Sunday),
1026 and the minimal length of the first week in year (by default 4).
1027 Regarding the start of the week,
1029 shall be used for Sunday and
1031 shall be used for Monday.
1034 .IR first_weekday " (since glibc 2.2)"
1035 followed by the number of the first day from the
1037 list to be shown in calendar applications.
1038 The default value of
1040 corresponds to either Sunday or Monday depending
1041 on the value of the second
1046 .IR first_workday " (since glibc 2.2)"
1047 followed by the number of the first working day from the
1050 The default value is
1055 .\" from localedata/locales/uk_UA
1056 followed by a value that indicates the direction for the
1057 display of calendar dates, as follows:
1061 Left-right from top.
1067 Right-left from top.
1071 followed by the appropriate date representation for
1076 definition ends with the string
1080 .I /usr/lib/locale/locale-archive
1081 Usual default locale archive location.
1083 .I /usr/share/i18n/locales
1084 Usual default path for locale definition files.
1086 POSIX.2, ISO/IEC TR 14652.
1088 The collective GNU C library community wisdom regarding
1096 https://sourceware.org/glibc/wiki/Locales
1099 The value of the second
1101 list item specifies the base of the
1108 specifies the offset of the first day-of-week in the
1114 For compatibility reasons, all glibc locales should set the value of the
1119 (Sunday) and base the
1123 lists appropriately, and set
1129 depending on whether the week actually starts on Sunday or Monday
1132 This manual page isn't complete.
1134 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)