Changes: Ready for 5.13
[man-pages.git] / man5 / locale.5
blob26ffef99ac1ebf3752e8d69196d90250f19c3d6e
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>
4 .\"
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.
10 .\"
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.
15 .\"
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/>.
19 .\" %%%LICENSE_END
20 .\"
21 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
22 .\"     LC_TIME: Describe first_weekday and first_workday
23 .\"
24 .TH LOCALE 5 2021-03-22 "Linux" "Linux User Manual"
25 .SH NAME
26 locale \- describes a locale definition file
27 .SH DESCRIPTION
28 The
29 .B locale
30 definition file contains all the information that the
31 .BR localedef (1)
32 command needs to convert it into the binary locale database.
33 .PP
34 The definition files consist of sections which each describe a
35 locale category in detail.
36 See
37 .BR locale (7)
38 for additional details for these categories.
39 .SS Syntax
40 The locale definition file starts with a header that may consist
41 of the following keywords:
42 .TP
43 .I escape_char
44 is followed by a character that should be used as the
45 escape-character for the rest of the file to mark characters that
46 should be interpreted in a special way.
47 It defaults to the backslash (\e).
48 .TP
49 .I comment_char
50 is followed by a character that will be used as the
51 comment-character for the rest of the file.
52 It defaults to the number sign (#).
53 .PP
54 The locale definition has one part for each locale category.
55 Each part can be copied from another existing locale or
56 can be defined from scratch.
57 If the category should be copied,
58 the only valid keyword in the definition is
59 .I copy
60 followed by the name of the locale in double quotes which should be
61 copied.
62 The exceptions for this rule are
63 .B LC_COLLATE
64 and
65 .B LC_CTYPE
66 where a
67 .I copy
68 statement can be followed by locale-specific rules and selected overrides.
69 .PP
70 When defining a locale or a category from scratch, an existing system-
71 provided locale definition file should be used as a reference to follow
72 common glibc conventions.
73 .SS Locale category sections
74 The following category sections are defined by POSIX:
75 .IP * 3
76 .B LC_CTYPE
77 .IP *
78 .B LC_COLLATE
79 .IP *
80 .B LC_MESSAGES
81 .IP *
82 .B LC_MONETARY
83 .IP *
84 .B LC_NUMERIC
85 .IP *
86 .B LC_TIME
87 .PP
88 In addition, since version 2.2,
89 the GNU C library supports the following nonstandard categories:
90 .IP * 3
91 .B LC_ADDRESS
92 .IP *
93 .B LC_IDENTIFICATION
94 .IP *
95 .B LC_MEASUREMENT
96 .IP *
97 .B LC_NAME
98 .IP *
99 .B LC_PAPER
100 .IP *
101 .B LC_TELEPHONE
104 .BR locale (7)
105 for a more detailed description of each category.
106 .SS LC_ADDRESS
107 The definition starts with the string
108 .I LC_ADDRESS
109 in the first column.
111 The following keywords are allowed:
113 .I postal_fmt
114 followed by a string containing field descriptors that define
115 the format used for postal addresses in the locale.
116 The following field descriptors are recognized:
120 Person's name, possibly constructed with the
121 .B LC_NAME
122 .I name_fmt
123 keyword (since glibc 2.24).
124 .TP 4
126 Care of person, or organization.
129 Firm name.
132 Department name.
135 Building name.
138 Street or block (e.g., Japanese) name.
141 House number or designation.
144 Insert an end-of-line if the previous descriptor's value was not an empty
145 string; otherwise ignore.
148 Insert a space if the previous descriptor's value was not an empty string;
149 otherwise ignore.
152 Room number, door designation.
155 Floor number.
158 Country designation, from the
159 .I country_post
160 keyword.
163 Local township within town or city (since glibc 2.24).
166 Zip number, postal code.
169 Town, city.
172 State, province, or prefecture.
175 Country, as taken from data record.
177 Each field descriptor may have an \(aqR\(aq after
178 the \(aq%\(aq to specify that the
179 information is taken from a Romanized version string of the
180 entity.
183 .I country_name
184 followed by the country name in the language of the current document
185 (e.g., "Deutschland" for the
186 .B de_DE
187 locale).
189 .I country_post
190 followed by the abbreviation of the country (see CERT_MAILCODES).
192 .I country_ab2
193 followed by the two-letter abbreviation of the country (ISO 3166).
195 .I country_ab3
196 followed by the three-letter abbreviation of the country (ISO 3166).
198 .I country_num
199 followed by the numeric country code (ISO 3166).
201 .I country_car
202 followed by the international license plate country code.
204 .I country_isbn
205 followed by the ISBN code (for books).
207 .I lang_name
208 followed by the language name in the language of the current document.
210 .I lang_ab
211 followed by the two-letter abbreviation of the language (ISO 639).
213 .I lang_term
214 followed by the three-letter abbreviation of the language (ISO 639-2/T).
216 .I lang_lib
217 followed by the three-letter abbreviation of the language for library
218 use (ISO 639-2/B).
219 Applications should in general prefer
220 .I lang_term
221 over
222 .IR lang_lib .
225 .B LC_ADDRESS
226 definition ends with the string
227 .IR "END LC_ADDRESS" .
228 .SS LC_CTYPE
229 The definition starts with the string
230 .I LC_CTYPE
231 in the first column.
233 The following keywords are allowed:
235 .I upper
236 followed by a list of uppercase letters.
237 The letters
238 .B A
239 through
240 .B Z
241 are included automatically.
242 Characters also specified as
243 .BR cntrl ,
244 .BR digit ,
245 .BR punct ,
247 .B space
248 are not allowed.
250 .I lower
251 followed by a list of lowercase letters.
252 The letters
253 .B a
254 through
255 .B z
256 are included automatically.
257 Characters also specified as
258 .BR cntrl ,
259 .BR digit ,
260 .BR punct ,
262 .B space
263 are not allowed.
265 .I alpha
266 followed by a list of letters.
267 All character specified as either
268 .B upper
270 .B lower
271 are automatically included.
272 Characters also specified as
273 .BR cntrl ,
274 .BR digit ,
275 .BR punct ,
277 .B space
278 are not allowed.
280 .I digit
281 followed by the characters classified as numeric digits.
282 Only the
283 digits
284 .B 0
285 through
286 .B 9
287 are allowed.
288 They are included by default in this class.
290 .I space
291 followed by a list of characters defined as white-space
292 characters.
293 Characters also specified as
294 .BR upper ,
295 .BR lower ,
296 .BR alpha ,
297 .BR digit ,
298 .BR graph ,
300 .B xdigit
301 are not allowed.
302 The characters
303 .BR <space> ,
304 .BR <form-feed> ,
305 .BR <newline> ,
306 .BR <carriage-return> ,
307 .BR <tab> ,
309 .B <vertical-tab>
310 are automatically included.
312 .I cntrl
313 followed by a list of control characters.
314 Characters also specified as
315 .BR upper ,
316 .BR lower ,
317 .BR alpha ,
318 .BR digit ,
319 .BR punct ,
320 .BR graph ,
321 .BR print ,
323 .B xdigit
324 are not allowed.
326 .I punct
327 followed by a list of punctuation characters.
328 Characters also
329 specified as
330 .BR upper ,
331 .BR lower ,
332 .BR alpha ,
333 .BR digit ,
334 .BR cntrl ,
335 .BR xdigit ,
336 or the
337 .B <space>
338 character are not allowed.
340 .I graph
341 followed by a list of printable characters, not including the
342 .B <space>
343 character.
344 The characters defined as
345 .BR upper ,
346 .BR lower ,
347 .BR alpha ,
348 .BR digit ,
349 .BR xdigit ,
351 .B punct
352 are automatically included.
353 Characters also specified as
354 .B cntrl
355 are not allowed.
357 .I print
358 followed by a list of printable characters, including the
359 .B <space>
360 character.
361 The characters defined as
362 .BR upper ,
363 .BR lower ,
364 .BR alpha ,
365 .BR digit ,
366 .BR xdigit ,
367 .BR punct ,
368 and the
369 .B <space>
370 character are automatically included.
371 Characters also specified as
372 .B cntrl
373 are not allowed.
375 .I xdigit
376 followed by a list of characters classified as hexadecimal
377 digits.
378 The decimal digits must be included followed by one or
379 more set of six characters in ascending order.
380 The following
381 characters are included by default:
382 .B 0
383 through
384 .BR 9 ,
385 .B a
386 through
387 .BR f ,
388 .B A
389 through
390 .BR F .
392 .I blank
393 followed by a list of characters classified as
394 .BR blank .
395 The characters
396 .B <space>
398 .B <tab>
399 are automatically included.
401 .I charclass
402 followed by a list of locale-specific character class names
403 which are then to be defined in the locale.
405 .I toupper
406 followed by a list of mappings from lowercase to uppercase
407 letters.
408 Each mapping is a pair of a lowercase and an uppercase letter
409 separated with a
410 .B ,
411 and enclosed in parentheses.
413 .I tolower
414 followed by a list of mappings from uppercase to lowercase
415 letters.
416 If the keyword tolower is not present, the reverse of the
417 toupper list is used.
419 .I map totitle
420 followed by a list of mapping pairs of
421 characters and letters
422 to be used in titles (headings).
424 .I class
425 followed by a locale-specific character class definition,
426 starting with the class name followed by the characters
427 belonging to the class.
429 .I charconv
430 followed by a list of locale-specific character mapping names
431 which are then to be defined in the locale.
433 .I outdigit
434 followed by a list of alternate output digits for the locale.
436 .I map to_inpunct
437 followed by a list of mapping pairs of
438 alternate digits and separators
439 for input digits for the locale.
441 .I map to_outpunct
442 followed by a list of mapping pairs of
443 alternate separators
444 for output for the locale.
446 .I translit_start
447 marks the start of the transliteration rules section.
448 The section can contain the
449 .I include
450 keyword in the beginning followed by
451 locale-specific rules and overrides.
452 Any rule specified in the locale file
453 will override any rule
454 copied or included from other files.
455 In case of duplicate rule definitions in the locale file,
456 only the first rule is used.
458 A transliteration rule consist of a character to be transliterated
459 followed by a list of transliteration targets separated by semicolons.
460 The first target which can be presented in the target character set
461 is used, if none of them can be used the
462 .I default_missing
463 character will be used instead.
465 .I include
466 in the transliteration rules section includes
467 a transliteration rule file
468 (and optionally a repertoire map file).
470 .I default_missing
471 in the transliteration rules section
472 defines the default character to be used for
473 transliteration where none of the targets cannot be presented
474 in the target character set.
476 .I translit_end
477 marks the end of the transliteration rules.
480 .B LC_CTYPE
481 definition ends with the string
482 .IR "END LC_CTYPE" .
483 .SS LC_COLLATE
484 Note that glibc does not support all POSIX-defined options,
485 only the options described below are supported (as of glibc 2.23).
487 The definition starts with the string
488 .I LC_COLLATE
489 in the first column.
491 The following keywords are allowed:
493 .I coll_weight_max
494 followed by the number representing used collation levels.
495 This keyword is recognized but ignored by glibc.
497 .I collating\-element
498 followed by the definition of a collating-element symbol
499 representing a multicharacter collating element.
501 .I collating\-symbol
502 followed by the definition of a collating symbol
503 that can be used in collation order statements.
505 .I define
506 followed by
507 .B string
508 to be evaluated in an
509 .I ifdef
510 .B string
512 .I else
514 .I endif
515 construct.
517 .I reorder\-after
518 followed by a redefinition of a collation rule.
520 .I reorder\-end
521 marks the end of the redefinition of a collation rule.
523 .I reorde\r-sections\-after
524 followed by a script name to reorder listed scripts after.
526 .I reorder\-sections\-end
527 marks the end of the reordering of sections.
529 .I script
530 followed by a declaration of a script.
532 .I symbol\-equivalence
533 followed by a collating-symbol to be equivalent to another defined
534 collating-symbol.
536 The collation rule definition starts with a line:
538 .I order_start
539 followed by a list of keywords chosen from
540 .BR forward ,
541 .BR backward ,
543 .BR position .
544 The order definition consists of lines that describe the collation
545 order and is terminated with the keyword
546 .IR order_end .
549 .B LC_COLLATE
550 definition ends with the string
551 .IR "END LC_COLLATE" .
552 .SS LC_IDENTIFICATION
553 The definition starts with the string
554 .I LC_IDENTIFICATION
555 in the first column.
557 The following keywords are allowed:
559 .I title
560 followed by the title of the locale document
561 (e.g., "Maori language locale for New Zealand").
563 .I source
564 followed by the name of the organization that maintains this document.
566 .I address
567 followed by the address of the organization that maintains this document.
569 .I contact
570 followed by the name of the contact person at
571 the organization that maintains this document.
573 .I email
574 followed by the email address of the person or
575 organization that maintains this document.
577 .I tel
578 followed by the telephone number (in international format)
579 of the organization that maintains this document.
580 As of glibc 2.24, this keyword is deprecated in favor of
581 other contact methods.
583 .I fax
584 followed by the fax number (in international format)
585 of the organization that maintains this document.
586 As of glibc 2.24, this keyword is deprecated in favor of
587 other contact methods.
589 .I language
590 followed by the name of the language to which this document applies.
592 .I territory
593 followed by the name of the country/geographic extent
594 to which this document applies.
596 .I audience
597 followed by a description of the audience for which this document is
598 intended.
600 .I application
601 followed by a description of any special application
602 for which this document is intended.
604 .I abbreviation
605 followed by the short name for provider of the source of this document.
607 .I revision
608 followed by the revision number of this document.
610 .I date
611 followed by the revision date of this document.
613 In addition, for each of the categories defined by the document,
614 there should be a line starting with the keyword
615 .IR category ,
616 followed by:
617 .IP * 3
618 a string that identifies this locale category definition,
619 .IP *
620 a semicolon, and
621 .IP *
622 one of the
623 .B LC_*
624 identifiers.
627 .B LC_IDENTIFICATION
628 definition ends with the string
629 .IR "END LC_IDENTIFICATION" .
630 .SS LC_MESSAGES
631 The definition starts with the string
632 .I LC_MESSAGES
633 in the first column.
635 The following keywords are allowed:
637 .I yesexpr
638 followed by a regular expression that describes possible
639 yes-responses.
641 .I noexpr
642 followed by a regular expression that describes possible
643 no-responses.
645 .I yesstr
646 followed by the output string corresponding to "yes".
648 .I nostr
649 followed by the output string corresponding to "no".
652 .B LC_MESSAGES
653 definition ends with the string
654 .IR "END LC_MESSAGES" .
655 .SS LC_MEASUREMENT
656 The definition starts with the string
657 .I LC_MEASUREMENT
658 in the first column.
660 The following keywords are allowed:
662 .I measurement
663 followed by number identifying the standard used for measurement.
664 The following values are recognized:
666 .TP 4
667 .B 1
668 Metric.
670 .B 2
671 US customary measurements.
675 .B LC_MEASUREMENT
676 definition ends with the string
677 .IR "END LC_MEASUREMENT" .
678 .SS LC_MONETARY
679 The definition starts with the string
680 .I LC_MONETARY
681 in the first column.
683 The following keywords are allowed:
685 .I int_curr_symbol
686 followed by the international currency symbol.
687 This must be a
688 4-character string containing the international currency symbol as
689 defined by the ISO 4217 standard (three characters) followed by a
690 separator.
692 .I currency_symbol
693 followed by the local currency symbol.
695 .I mon_decimal_point
696 followed by the single-character string that will be used as the
697 decimal delimiter when formatting monetary quantities.
699 .I mon_thousands_sep
700 followed by the single-character string that will be used as a group
701 separator when formatting monetary quantities.
703 .I mon_grouping
704 followed by a sequence of integers separated by semicolons that
705 describe the formatting of monetary quantities.
707 .I grouping
708 below for details.
710 .I positive_sign
711 followed by a string that is used to indicate a positive sign for
712 monetary quantities.
714 .I negative_sign
715 followed by a string that is used to indicate a negative sign for
716 monetary quantities.
718 .I int_frac_digits
719 followed by the number of fractional digits that should be used when
720 formatting with the
721 .IR int_curr_symbol .
723 .I frac_digits
724 followed by the number of fractional digits that should be used when
725 formatting with the
726 .IR currency_symbol .
728 .I p_cs_precedes
729 followed by an integer that indicates the placement of
730 .I currency_symbol
731 for a nonnegative formatted monetary quantity:
733 .TP 4
734 .B 0
735 the symbol succeeds the value.
737 .B 1
738 the symbol precedes the value.
741 .I p_sep_by_space
742 followed by an integer that indicates the separation of
743 .IR currency_symbol ,
744 the sign string, and the value for a nonnegative formatted monetary quantity.
745 The following values are recognized:
747 .TP 4
748 .B 0
749 No space separates the currency symbol and the value.
751 .B 1
752 If the currency symbol and the sign string are adjacent,
753 a space separates them from the value;
754 otherwise a space separates the currency symbol and the value.
756 .B 2
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 sign string and the value.
762 .I n_cs_precedes
763 followed by an integer that indicates the placement of
764 .I currency_symbol
765 for a negative formatted monetary quantity.
766 The same values are recognized as for
767 .IR p_cs_precedes .
769 .I n_sep_by_space
770 followed by an integer that indicates the separation of
771 .IR currency_symbol ,
772 the sign string, and the value for a negative formatted monetary quantity.
773 The same values are recognized as for
774 .IR p_sep_by_space .
776 .I p_sign_posn
777 followed by an integer that indicates where the
778 .I positive_sign
779 should be placed for a nonnegative monetary quantity:
781 .TP 4
782 .B 0
783 Parentheses enclose the quantity and the
784 .I currency_symbol
786 .IR int_curr_symbol .
788 .B 1
789 The sign string precedes the quantity and the
790 .I currency_symbol
791 or the
792 .IR int_curr_symbol .
794 .B 2
795 The sign string succeeds the quantity and the
796 .I currency_symbol
797 or the
798 .IR int_curr_symbol .
800 .B 3
801 The sign string precedes the
802 .I currency_symbol
803 or the
804 .IR int_curr_symbol .
806 .B 4
807 The sign string succeeds the
808 .I currency_symbol
809 or the
810 .IR int_curr_symbol .
813 .I n_sign_posn
814 followed by an integer that indicates where the
815 .I negative_sign
816 should be placed for a negative monetary quantity.
817 The same values are recognized as for
818 .IR p_sign_posn .
820 .I int_p_cs_precedes
821 followed by an integer that indicates the placement of
822 .I int_curr_symbol
823 for a nonnegative internationally formatted monetary quantity.
824 The same values are recognized as for
825 .IR p_cs_precedes .
827 .I int_n_cs_precedes
828 followed by an integer that indicates the placement of
829 .I int_curr_symbol
830 for a negative internationally formatted monetary quantity.
831 The same values are recognized as for
832 .IR p_cs_precedes .
834 .I int_p_sep_by_space
835 followed by an integer that indicates the separation of
836 .IR int_curr_symbol ,
837 the sign string,
838 and the value for a nonnegative internationally formatted monetary quantity.
839 The same values are recognized as for
840 .IR p_sep_by_space .
842 .I int_n_sep_by_space
843 followed by an integer that indicates the separation of
844 .IR int_curr_symbol ,
845 the sign string,
846 and the value for a negative internationally formatted monetary quantity.
847 The same values are recognized as for
848 .IR p_sep_by_space .
850 .I int_p_sign_posn
851 followed by an integer that indicates where the
852 .I positive_sign
853 should be placed for a nonnegative
854 internationally formatted monetary quantity.
855 The same values are recognized as for
856 .IR p_sign_posn .
858 .I int_n_sign_posn
859 followed by an integer that indicates where the
860 .I negative_sign
861 should be placed for a negative
862 internationally formatted monetary quantity.
863 The same values are recognized as for
864 .IR p_sign_posn .
867 .B LC_MONETARY
868 definition ends with the string
869 .IR "END LC_MONETARY" .
870 .SS LC_NAME
871 The definition starts with the string
872 .I LC_NAME
873 in the first column.
875 Various keywords are allowed, but only
876 .I name_fmt
877 is mandatory.
878 Other keywords are needed only if there is common convention to
879 use the corresponding salutation in this locale.
880 The allowed keywords are as follows:
882 .I name_fmt
883 followed by a string containing field descriptors that define
884 the format used for names in the locale.
885 The following field descriptors are recognized:
887 .TP 4
889 Family name(s).
892 Family names in uppercase.
895 First given name.
898 First given initial.
901 First given name with Latin letters.
904 Other shorter name.
907 Additional given name(s).
910 Initials for additional given name(s).
913 Profession.
916 Salutation, such as "Doctor".
919 Abbreviated salutation, such as "Mr." or "Dr.".
922 Salutation, using the FDCC-sets conventions.
923 .\"  1 for the name_gen
924 .\"         In glibc 2.19, %d1 is used in only:
925 .\"             /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
926 .\"             /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
927 .\"         In glibc 2.19, %d[2-5] appear to be not used at all
928 .\"  2 for name_mr
929 .\"  3 for name_mrs
930 .\"  4 for name_miss
931 .\"  5 for name_ms
934 If the preceding field descriptor resulted in an empty string,
935 then the empty string, otherwise a space character.
938 .I name_gen
939 followed by the general salutation for any gender.
941 .I name_mr
942 followed by the salutation for men.
944 .I name_mrs
945 followed by the salutation for married women.
947 .I name_miss
948 followed by the salutation for unmarried women.
950 .I name_ms
951 followed by the salutation valid for all women.
954 .B LC_NAME
955 definition ends with the string
956 .IR "END LC_NAME" .
957 .SS LC_NUMERIC
958 The definition starts with the string
959 .I LC_NUMERIC
960 in the first column.
962 The following keywords are allowed:
964 .I decimal_point
965 followed by the single-character string that will be used as the
966 decimal delimiter when formatting numeric quantities.
968 .I thousands_sep
969 followed by the single-character string that will be used as a group
970 separator when formatting numeric quantities.
972 .I grouping
973 followed by a sequence of integers separated by semicolons
974 that describe the formatting of numeric quantities.
976 Each integer specifies the number of digits in a group.
977 The first integer defines the size of the group immediately
978 to the left of the decimal delimiter.
979 Subsequent integers define succeeding groups to the
980 left of the previous group.
981 If the last integer is not \-1, then the size of the previous group
982 (if any) is repeatedly used for the remainder of the digits.
983 If the last integer is \-1, then no further grouping is performed.
986 .B LC_NUMERIC
987 definition ends with the string
988 .IR "END LC_NUMERIC" .
989 .SS LC_PAPER
990 The definition starts with the string
991 .I LC_PAPER
992 in the first column.
994 The following keywords are allowed:
996 .I height
997 followed by the height, in millimeters, of the standard paper format.
999 .I width
1000 followed by the width, in millimeters, of the standard paper format.
1003 .B LC_PAPER
1004 definition ends with the string
1005 .IR "END LC_PAPER" .
1006 .SS LC_TELEPHONE
1007 The definition starts with the string
1008 .I LC_TELEPHONE
1009 in the first column.
1011 The following keywords are allowed:
1013 .I tel_int_fmt
1014 followed by a string that contains field descriptors that identify
1015 the format used to dial international numbers.
1016 The following field descriptors are recognized:
1018 .TP 4
1020 Area code without nationwide prefix (the prefix is often "00").
1023 Area code including nationwide prefix.
1026 Local number (within area code).
1029 Extension (to local number).
1032 Country code.
1035 Alternate carrier service code used for dialing abroad.
1038 If the preceding field descriptor resulted in an empty string,
1039 then the empty string, otherwise a space character.
1042 .I tel_dom_fmt
1043 followed by a string that contains field descriptors that identify
1044 the format used to dial domestic numbers.
1045 The recognized field descriptors are the same as for
1046 .IR tel_int_fmt .
1048 .I int_select
1049 followed by the prefix used to call international phone numbers.
1051 .I int_prefix
1052 followed by the prefix used from other countries to dial this country.
1055 .B LC_TELEPHONE
1056 definition ends with the string
1057 .IR "END LC_TELEPHONE" .
1058 .SS LC_TIME
1059 The definition starts with the string
1060 .I LC_TIME
1061 in the first column.
1063 The following keywords are allowed:
1065 .I abday
1066 followed by a list of abbreviated names of the days of the week.
1067 The list starts with the first day of the week
1068 as specified by
1069 .I week
1070 (Sunday by default).
1071 See NOTES.
1073 .I day
1074 followed by a list of names of the days of the week.
1075 The list starts with the first day of the week
1076 as specified by
1077 .I week
1078 (Sunday by default).
1079 See NOTES.
1081 .I abmon
1082 followed by a list of abbreviated month names.
1084 .I mon
1085 followed by a list of month names.
1087 .I d_t_fmt
1088 followed by the appropriate date and time format
1089 (for syntax, see
1090 .BR strftime (3)).
1092 .I d_fmt
1093 followed by the appropriate date format
1094 (for syntax, see
1095 .BR strftime (3)).
1097 .I t_fmt
1098 followed by the appropriate time format
1099 (for syntax, see
1100 .BR strftime (3)).
1102 .I am_pm
1103 followed by the appropriate representation of the
1104 .B am
1106 .B pm
1107 strings.
1108 This should be left empty for locales not using AM/PM convention.
1110 .I t_fmt_ampm
1111 followed by the appropriate time format
1112 (for syntax, see
1113 .BR strftime (3))
1114 when using 12h clock format.
1115 This should be left empty for locales not using AM/PM convention.
1117 .I era
1118 followed by semicolon-separated strings that define how years are
1119 counted and displayed for each era in the locale.
1120 Each string has the following format:
1123 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1125 The fields are to be defined as follows:
1126 .TP 4
1127 .I direction
1128 Either
1129 .B +
1131 .BR \- .
1132 .B +
1133 means the years closer to
1134 .I start_date
1135 have lower numbers than years closer to
1136 .IR end_date .
1137 .B \-
1138 means the opposite.
1140 .I offset
1141 The number of the year closest to
1142 .I start_date
1143 in the era, corresponding to the
1144 .I %Ey
1145 descriptor (see
1146 .BR strptime (3)).
1148 .I start_date
1149 The start of the era in the form of
1150 .IR yyyy/mm/dd .
1151 Years prior AD 1 are represented as negative numbers.
1153 .I end_date
1154 The end of the era in the form of
1155 .IR yyyy/mm/dd ,
1156 or one of the two special values of
1157 .B \-*
1159 .BR +* .
1160 .B \-*
1161 means the ending date is the beginning of time.
1162 .B +*
1163 means the ending date is the end of time.
1165 .I era_name
1166 The name of the era corresponding to the
1167 .I %EC
1168 descriptor (see
1169 .BR strptime (3)).
1171 .I era_format
1172 The format of the year in the era corresponding to the
1173 .I %EY
1174 descriptor (see
1175 .BR strptime (3)).
1178 .I era_d_fmt
1179 followed by the format of the date in alternative era notation,
1180 corresponding to the
1181 .I %Ex
1182 descriptor (see
1183 .BR strptime (3)).
1185 .I era_t_fmt
1186 followed by the format of the time in alternative era notation,
1187 corresponding to the
1188 .I %EX
1189 descriptor (see
1190 .BR strptime (3)).
1192 .I era_d_t_fmt
1193 followed by the format of the date and time in alternative era notation,
1194 corresponding to the
1195 .I %Ec
1196 descriptor (see
1197 .BR strptime (3)).
1199 .I alt_digits
1200 followed by the alternative digits used for date and time in the locale.
1202 .I week
1203 followed by a list of three values separated by semicolons:
1204 The number of days in a week (by default 7),
1205 a date of beginning of the week (by default corresponds to Sunday),
1206 and the minimal length of the first week in year (by default 4).
1207 Regarding the start of the week,
1208 .B 19971130
1209 shall be used for Sunday and
1210 .B 19971201
1211 shall be used for Monday.
1212 See NOTES.
1214 .IR first_weekday " (since glibc 2.2)"
1215 followed by the number of the day from the
1216 .I day
1217 list to be shown as the first day of the week in calendar applications.
1218 The default value of
1219 .B 1
1220 corresponds to either Sunday or Monday depending
1221 on the value of the second
1222 .I week
1223 list item.
1224 See NOTES.
1226 .IR first_workday " (since glibc 2.2)"
1227 followed by the number of the first working day from the
1228 .I day
1229 list.
1230 The default value is
1231 .BR 2 .
1232 See NOTES.
1234 .I cal_direction
1235 followed by a number value that indicates the direction for the
1236 display of calendar dates, as follows:
1238 .TP 4
1239 .B 1
1240 Left-right from top.
1242 .B 2
1243 Top-down from left.
1245 .B 3
1246 Right-left from top.
1249 .I date_fmt
1250 followed by the appropriate date representation for
1251 .BR date (1)
1252 (for syntax, see
1253 .BR strftime (3)).
1256 .B LC_TIME
1257 definition ends with the string
1258 .IR "END LC_TIME" .
1259 .SH FILES
1261 .I /usr/lib/locale/locale\-archive
1262 Usual default locale archive location.
1264 .I /usr/share/i18n/locales
1265 Usual default path for locale definition files.
1266 .SH CONFORMING TO
1267 POSIX.2.
1268 .SH NOTES
1269 The collective GNU C library community wisdom regarding
1270 .IR abday ,
1271 .IR day ,
1272 .IR week ,
1273 .IR first_weekday ,
1275 .I first_workday
1276 states at
1277 https://sourceware.org/glibc/wiki/Locales
1278 the following:
1279 .IP * 3
1280 The value of the second
1281 .I week
1282 list item specifies the base of the
1283 .I abday
1285 .I day
1286 lists.
1287 .IP *
1288 .I first_weekday
1289 specifies the offset of the first day-of-week in the
1290 .I abday
1292 .I day
1293 lists.
1294 .IP *
1295 For compatibility reasons, all glibc locales should set the value of the
1296 second
1297 .I week
1298 list item to
1299 .B 19971130
1300 (Sunday) and base the
1301 .I abday
1303 .I day
1304 lists appropriately, and set
1305 .I first_weekday
1307 .I first_workday
1309 .B 1
1311 .BR 2 ,
1312 depending on whether the week and work week actually starts on Sunday or
1313 Monday for the locale.
1314 .\" .SH AUTHOR
1315 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)
1316 .SH SEE ALSO
1317 .BR iconv (1),
1318 .BR locale (1),
1319 .BR localedef (1),
1320 .BR localeconv (3),
1321 .BR newlocale (3),
1322 .BR setlocale (3),
1323 .BR strftime (3),
1324 .BR strptime (3),
1325 .BR uselocale (3),
1326 .BR charmap (5),
1327 .BR charsets (7),
1328 .BR locale (7),
1329 .BR unicode (7),
1330 .BR utf\-8 (7)