CONTRIBUTING.d/patches: Please provide a git-range-diff(1)
[man-pages.git] / man5 / locale.5
blob39c93c88b5a91dd062ff7ffa2b335ab96949e344
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 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
8 .\"     LC_TIME: Describe first_weekday and first_workday
9 .\"
10 .TH locale 5 (date) "Linux man-pages (unreleased)"
11 .SH NAME
12 locale \- describes a locale definition file
13 .SH DESCRIPTION
14 The
15 .B locale
16 definition file contains all the information that the
17 .BR localedef (1)
18 command needs to convert it into the binary locale database.
20 The definition files consist of sections which each describe a
21 locale category in detail.
22 See
23 .BR locale (7)
24 for additional details for these categories.
25 .SS Syntax
26 The locale definition file starts with a header that may consist
27 of the following keywords:
28 .TP
29 .I escape_char
30 is followed by a character that should be used as the
31 escape-character for the rest of the file to mark characters that
32 should be interpreted in a special way.
33 It defaults to the backslash (\e).
34 .TP
35 .I comment_char
36 is followed by a character that will be used as the
37 comment-character for the rest of the file.
38 It defaults to the number sign (#).
40 The locale definition has one part for each locale category.
41 Each part can be copied from another existing locale or
42 can be defined from scratch.
43 If the category should be copied,
44 the only valid keyword in the definition is
45 .I copy
46 followed by the name of the locale in double quotes which should be
47 copied.
48 The exceptions for this rule are
49 .B LC_COLLATE
50 and
51 .B LC_CTYPE
52 where a
53 .I copy
54 statement can be followed by locale-specific rules and selected overrides.
56 When defining a locale or a category from scratch, an existing system-
57 provided locale definition file should be used as a reference to follow
58 common glibc conventions.
59 .SS Locale category sections
60 The following category sections are defined by POSIX:
61 .IP \[bu] 3
62 .B LC_CTYPE
63 .IP \[bu]
64 .B LC_COLLATE
65 .IP \[bu]
66 .B LC_MESSAGES
67 .IP \[bu]
68 .B LC_MONETARY
69 .IP \[bu]
70 .B LC_NUMERIC
71 .IP \[bu]
72 .B LC_TIME
74 In addition, since glibc 2.2,
75 the GNU C library supports the following nonstandard categories:
76 .IP \[bu] 3
77 .B LC_ADDRESS
78 .IP \[bu]
79 .B LC_IDENTIFICATION
80 .IP \[bu]
81 .B LC_MEASUREMENT
82 .IP \[bu]
83 .B LC_NAME
84 .IP \[bu]
85 .B LC_PAPER
86 .IP \[bu]
87 .B LC_TELEPHONE
89 See
90 .BR locale (7)
91 for a more detailed description of each category.
92 .SS LC_ADDRESS
93 The definition starts with the string
94 .I LC_ADDRESS
95 in the first column.
97 The following keywords are allowed:
98 .TP
99 .I postal_fmt
100 followed by a string containing field descriptors that define
101 the format used for postal addresses in the locale.
102 The following field descriptors are recognized:
106 Person's name, possibly constructed with the
107 .B LC_NAME
108 .I name_fmt
109 keyword (since glibc 2.24).
110 .TP 4
112 Care of person, or organization.
115 Firm name.
118 Department name.
121 Building name.
124 Street or block (e.g., Japanese) name.
127 House number or designation.
130 Insert an end-of-line if the previous descriptor's value was not an empty
131 string; otherwise ignore.
134 Insert a space if the previous descriptor's value was not an empty string;
135 otherwise ignore.
138 Room number, door designation.
141 Floor number.
144 Country designation, from the
145 .I country_post
146 keyword.
149 Local township within town or city (since glibc 2.24).
152 Zip number, postal code.
155 Town, city.
158 State, province, or prefecture.
161 Country, as taken from data record.
163 Each field descriptor may have an \[aq]R\[aq] after
164 the \[aq]%\[aq] to specify that the
165 information is taken from a Romanized version string of the
166 entity.
169 .I country_name
170 followed by the country name in the language of the current document
171 (e.g., "Deutschland" for the
172 .B de_DE
173 locale).
175 .I country_post
176 followed by the abbreviation of the country (see CERT_MAILCODES).
178 .I country_ab2
179 followed by the two-letter abbreviation of the country (ISO\~3166).
181 .I country_ab3
182 followed by the three-letter abbreviation of the country (ISO\~3166).
184 .I country_num
185 followed by the numeric country code (ISO\~3166).
187 .I country_car
188 followed by the international license plate country code.
190 .I country_isbn
191 followed by the ISBN code (for books).
193 .I lang_name
194 followed by the language name in the language of the current document.
196 .I lang_ab
197 followed by the two-letter abbreviation of the language (ISO\~639).
199 .I lang_term
200 followed by the three-letter abbreviation of the language (ISO\~639-2/T).
202 .I lang_lib
203 followed by the three-letter abbreviation of the language for library
204 use (ISO\~639-2/B).
205 Applications should in general prefer
206 .I lang_term
207 over
208 .IR lang_lib .
211 .B LC_ADDRESS
212 definition ends with the string
213 .IR "END LC_ADDRESS" .
214 .SS LC_CTYPE
215 The definition starts with the string
216 .I LC_CTYPE
217 in the first column.
219 The following keywords are allowed:
221 .I upper
222 followed by a list of uppercase letters.
223 The letters
224 .B A
225 through
226 .B Z
227 are included automatically.
228 Characters also specified as
229 .BR cntrl ,
230 .BR digit ,
231 .BR punct ,
233 .B space
234 are not allowed.
236 .I lower
237 followed by a list of lowercase letters.
238 The letters
239 .B a
240 through
241 .B z
242 are included automatically.
243 Characters also specified as
244 .BR cntrl ,
245 .BR digit ,
246 .BR punct ,
248 .B space
249 are not allowed.
251 .I alpha
252 followed by a list of letters.
253 All character specified as either
254 .B upper
256 .B lower
257 are automatically included.
258 Characters also specified as
259 .BR cntrl ,
260 .BR digit ,
261 .BR punct ,
263 .B space
264 are not allowed.
266 .I digit
267 followed by the characters classified as numeric digits.
268 Only the
269 digits
270 .B 0
271 through
272 .B 9
273 are allowed.
274 They are included by default in this class.
276 .I space
277 followed by a list of characters defined as white-space
278 characters.
279 Characters also specified as
280 .BR upper ,
281 .BR lower ,
282 .BR alpha ,
283 .BR digit ,
284 .BR graph ,
286 .B xdigit
287 are not allowed.
288 The characters
289 .BR <space> ,
290 .BR <form-feed> ,
291 .BR <newline> ,
292 .BR <carriage-return> ,
293 .BR <tab> ,
295 .B <vertical-tab>
296 are automatically included.
298 .I cntrl
299 followed by a list of control characters.
300 Characters also specified as
301 .BR upper ,
302 .BR lower ,
303 .BR alpha ,
304 .BR digit ,
305 .BR punct ,
306 .BR graph ,
307 .BR print ,
309 .B xdigit
310 are not allowed.
312 .I punct
313 followed by a list of punctuation characters.
314 Characters also
315 specified as
316 .BR upper ,
317 .BR lower ,
318 .BR alpha ,
319 .BR digit ,
320 .BR cntrl ,
321 .BR xdigit ,
322 or the
323 .B <space>
324 character are not allowed.
326 .I graph
327 followed by a list of printable characters, not including the
328 .B <space>
329 character.
330 The characters defined as
331 .BR upper ,
332 .BR lower ,
333 .BR alpha ,
334 .BR digit ,
335 .BR xdigit ,
337 .B punct
338 are automatically included.
339 Characters also specified as
340 .B cntrl
341 are not allowed.
343 .I print
344 followed by a list of printable characters, including the
345 .B <space>
346 character.
347 The characters defined as
348 .BR upper ,
349 .BR lower ,
350 .BR alpha ,
351 .BR digit ,
352 .BR xdigit ,
353 .BR punct ,
354 and the
355 .B <space>
356 character are automatically included.
357 Characters also specified as
358 .B cntrl
359 are not allowed.
361 .I xdigit
362 followed by a list of characters classified as hexadecimal
363 digits.
364 The decimal digits must be included followed by one or
365 more set of six characters in ascending order.
366 The following
367 characters are included by default:
368 .B 0
369 through
370 .BR 9 ,
371 .B a
372 through
373 .BR f ,
374 .B A
375 through
376 .BR F .
378 .I blank
379 followed by a list of characters classified as
380 .BR blank .
381 The characters
382 .B <space>
384 .B <tab>
385 are automatically included.
387 .I charclass
388 followed by a list of locale-specific character class names
389 which are then to be defined in the locale.
391 .I toupper
392 followed by a list of mappings from lowercase to uppercase
393 letters.
394 Each mapping is a pair of a lowercase and an uppercase letter
395 separated with a
396 .B ,
397 and enclosed in parentheses.
399 .I tolower
400 followed by a list of mappings from uppercase to lowercase
401 letters.
402 If the keyword tolower is not present, the reverse of the
403 toupper list is used.
405 .I map totitle
406 followed by a list of mapping pairs of
407 characters and letters
408 to be used in titles (headings).
410 .I class
411 followed by a locale-specific character class definition,
412 starting with the class name followed by the characters
413 belonging to the class.
415 .I charconv
416 followed by a list of locale-specific character mapping names
417 which are then to be defined in the locale.
419 .I outdigit
420 followed by a list of alternate output digits for the locale.
422 .I map to_inpunct
423 followed by a list of mapping pairs of
424 alternate digits and separators
425 for input digits for the locale.
427 .I map to_outpunct
428 followed by a list of mapping pairs of
429 alternate separators
430 for output for the locale.
432 .I translit_start
433 marks the start of the transliteration rules section.
434 The section can contain the
435 .I include
436 keyword in the beginning followed by
437 locale-specific rules and overrides.
438 Any rule specified in the locale file
439 will override any rule
440 copied or included from other files.
441 In case of duplicate rule definitions in the locale file,
442 only the first rule is used.
444 A transliteration rule consist of a character to be transliterated
445 followed by a list of transliteration targets separated by semicolons.
446 The first target which can be presented in the target character set
447 is used, if none of them can be used the
448 .I default_missing
449 character will be used instead.
451 .I include
452 in the transliteration rules section includes
453 a transliteration rule file
454 (and optionally a repertoire map file).
456 .I default_missing
457 in the transliteration rules section
458 defines the default character to be used for
459 transliteration where none of the targets cannot be presented
460 in the target character set.
462 .I translit_end
463 marks the end of the transliteration rules.
466 .B LC_CTYPE
467 definition ends with the string
468 .IR "END LC_CTYPE" .
469 .SS LC_COLLATE
470 Note that glibc does not support all POSIX-defined options,
471 only the options described below are supported (as of glibc 2.23).
473 The definition starts with the string
474 .I LC_COLLATE
475 in the first column.
477 The following keywords are allowed:
479 .I coll_weight_max
480 followed by the number representing used collation levels.
481 This keyword is recognized but ignored by glibc.
483 .I collating\-element
484 followed by the definition of a collating-element symbol
485 representing a multicharacter collating element.
487 .I collating\-symbol
488 followed by the definition of a collating symbol
489 that can be used in collation order statements.
491 .I define
492 followed by
493 .B string
494 to be evaluated in an
495 .I ifdef
496 .B string
498 .I else
500 .I endif
501 construct.
503 .I reorder\-after
504 followed by a redefinition of a collation rule.
506 .I reorder\-end
507 marks the end of the redefinition of a collation rule.
509 .I reorder\-sections\-after
510 followed by a script name to reorder listed scripts after.
512 .I reorder\-sections\-end
513 marks the end of the reordering of sections.
515 .I script
516 followed by a declaration of a script.
518 .I symbol\-equivalence
519 followed by a collating-symbol to be equivalent to another defined
520 collating-symbol.
522 The collation rule definition starts with a line:
524 .I order_start
525 followed by a list of keywords chosen from
526 .BR forward ,
527 .BR backward ,
529 .BR position .
530 The order definition consists of lines that describe the collation
531 order and is terminated with the keyword
532 .IR order_end .
535 .B LC_COLLATE
536 definition ends with the string
537 .IR "END LC_COLLATE" .
538 .SS LC_IDENTIFICATION
539 The definition starts with the string
540 .I LC_IDENTIFICATION
541 in the first column.
543 The following keywords are allowed:
545 .I title
546 followed by the title of the locale document
547 (e.g., "Maori language locale for New Zealand").
549 .I source
550 followed by the name of the organization that maintains this document.
552 .I address
553 followed by the address of the organization that maintains this document.
555 .I contact
556 followed by the name of the contact person at
557 the organization that maintains this document.
559 .I email
560 followed by the email address of the person or
561 organization that maintains this document.
563 .I tel
564 followed by the telephone number (in international format)
565 of the organization that maintains this document.
566 As of glibc 2.24, this keyword is deprecated in favor of
567 other contact methods.
569 .I fax
570 followed by the fax number (in international format)
571 of the organization that maintains this document.
572 As of glibc 2.24, this keyword is deprecated in favor of
573 other contact methods.
575 .I language
576 followed by the name of the language to which this document applies.
578 .I territory
579 followed by the name of the country/geographic extent
580 to which this document applies.
582 .I audience
583 followed by a description of the audience for which this document is
584 intended.
586 .I application
587 followed by a description of any special application
588 for which this document is intended.
590 .I abbreviation
591 followed by the short name for provider of the source of this document.
593 .I revision
594 followed by the revision number of this document.
596 .I date
597 followed by the revision date of this document.
599 In addition, for each of the categories defined by the document,
600 there should be a line starting with the keyword
601 .IR category ,
602 followed by:
603 .IP (1) 5
604 a string that identifies this locale category definition,
605 .IP (2)
606 a semicolon, and
607 .IP (3)
608 one of the
609 .B LC_*
610 identifiers.
613 .B LC_IDENTIFICATION
614 definition ends with the string
615 .IR "END LC_IDENTIFICATION" .
616 .SS LC_MESSAGES
617 The definition starts with the string
618 .I LC_MESSAGES
619 in the first column.
621 The following keywords are allowed:
623 .I yesexpr
624 followed by a regular expression that describes possible
625 yes-responses.
627 .I noexpr
628 followed by a regular expression that describes possible
629 no-responses.
631 .I yesstr
632 followed by the output string corresponding to "yes".
634 .I nostr
635 followed by the output string corresponding to "no".
638 .B LC_MESSAGES
639 definition ends with the string
640 .IR "END LC_MESSAGES" .
641 .SS LC_MEASUREMENT
642 The definition starts with the string
643 .I LC_MEASUREMENT
644 in the first column.
646 The following keywords are allowed:
648 .I measurement
649 followed by number identifying the standard used for measurement.
650 The following values are recognized:
652 .TP 4
653 .B 1
654 Metric.
656 .B 2
657 US customary measurements.
661 .B LC_MEASUREMENT
662 definition ends with the string
663 .IR "END LC_MEASUREMENT" .
664 .SS LC_MONETARY
665 The definition starts with the string
666 .I LC_MONETARY
667 in the first column.
669 The following keywords are allowed:
671 .I int_curr_symbol
672 followed by the international currency symbol.
673 This must be a
674 4-character string containing the international currency symbol as
675 defined by the ISO\~4217 standard (three characters) followed by a
676 separator.
678 .I currency_symbol
679 followed by the local currency symbol.
681 .I mon_decimal_point
682 followed by the single-character string that will be used as the
683 decimal delimiter when formatting monetary quantities.
685 .I mon_thousands_sep
686 followed by the single-character string that will be used as a group
687 separator when formatting monetary quantities.
689 .I mon_grouping
690 followed by a sequence of integers separated by semicolons that
691 describe the formatting of monetary quantities.
693 .I grouping
694 below for details.
696 .I positive_sign
697 followed by a string that is used to indicate a positive sign for
698 monetary quantities.
700 .I negative_sign
701 followed by a string that is used to indicate a negative sign for
702 monetary quantities.
704 .I int_frac_digits
705 followed by the number of fractional digits that should be used when
706 formatting with the
707 .IR int_curr_symbol .
709 .I frac_digits
710 followed by the number of fractional digits that should be used when
711 formatting with the
712 .IR currency_symbol .
714 .I p_cs_precedes
715 followed by an integer that indicates the placement of
716 .I currency_symbol
717 for a nonnegative formatted monetary quantity:
719 .TP 4
720 .B 0
721 the symbol succeeds the value.
723 .B 1
724 the symbol precedes the value.
727 .I p_sep_by_space
728 followed by an integer that indicates the separation of
729 .IR currency_symbol ,
730 the sign string, and the value for a nonnegative formatted monetary quantity.
731 The following values are recognized:
733 .TP 4
734 .B 0
735 No space separates the currency symbol and the value.
737 .B 1
738 If the currency symbol and the sign string are adjacent,
739 a space separates them from the value;
740 otherwise a space separates the currency symbol and the value.
742 .B 2
743 If the currency symbol and the sign string are adjacent,
744 a space separates them from the value;
745 otherwise a space separates the sign string and the value.
748 .I n_cs_precedes
749 followed by an integer that indicates the placement of
750 .I currency_symbol
751 for a negative formatted monetary quantity.
752 The same values are recognized as for
753 .IR p_cs_precedes .
755 .I n_sep_by_space
756 followed by an integer that indicates the separation of
757 .IR currency_symbol ,
758 the sign string, and the value for a negative formatted monetary quantity.
759 The same values are recognized as for
760 .IR p_sep_by_space .
762 .I p_sign_posn
763 followed by an integer that indicates where the
764 .I positive_sign
765 should be placed for a nonnegative monetary quantity:
767 .TP 4
768 .B 0
769 Parentheses enclose the quantity and the
770 .I currency_symbol
772 .IR int_curr_symbol .
774 .B 1
775 The sign string precedes the quantity and the
776 .I currency_symbol
777 or the
778 .IR int_curr_symbol .
780 .B 2
781 The sign string succeeds the quantity and the
782 .I currency_symbol
783 or the
784 .IR int_curr_symbol .
786 .B 3
787 The sign string precedes the
788 .I currency_symbol
789 or the
790 .IR int_curr_symbol .
792 .B 4
793 The sign string succeeds the
794 .I currency_symbol
795 or the
796 .IR int_curr_symbol .
799 .I n_sign_posn
800 followed by an integer that indicates where the
801 .I negative_sign
802 should be placed for a negative monetary quantity.
803 The same values are recognized as for
804 .IR p_sign_posn .
806 .I int_p_cs_precedes
807 followed by an integer that indicates the placement of
808 .I int_curr_symbol
809 for a nonnegative internationally formatted monetary quantity.
810 The same values are recognized as for
811 .IR p_cs_precedes .
813 .I int_n_cs_precedes
814 followed by an integer that indicates the placement of
815 .I int_curr_symbol
816 for a negative internationally formatted monetary quantity.
817 The same values are recognized as for
818 .IR p_cs_precedes .
820 .I int_p_sep_by_space
821 followed by an integer that indicates the separation of
822 .IR int_curr_symbol ,
823 the sign string,
824 and the value for a nonnegative internationally formatted monetary quantity.
825 The same values are recognized as for
826 .IR p_sep_by_space .
828 .I int_n_sep_by_space
829 followed by an integer that indicates the separation of
830 .IR int_curr_symbol ,
831 the sign string,
832 and the value for a negative internationally formatted monetary quantity.
833 The same values are recognized as for
834 .IR p_sep_by_space .
836 .I int_p_sign_posn
837 followed by an integer that indicates where the
838 .I positive_sign
839 should be placed for a nonnegative
840 internationally formatted monetary quantity.
841 The same values are recognized as for
842 .IR p_sign_posn .
844 .I int_n_sign_posn
845 followed by an integer that indicates where the
846 .I negative_sign
847 should be placed for a negative
848 internationally formatted monetary quantity.
849 The same values are recognized as for
850 .IR p_sign_posn .
853 .B LC_MONETARY
854 definition ends with the string
855 .IR "END LC_MONETARY" .
856 .SS LC_NAME
857 The definition starts with the string
858 .I LC_NAME
859 in the first column.
861 Various keywords are allowed, but only
862 .I name_fmt
863 is mandatory.
864 Other keywords are needed only if there is common convention to
865 use the corresponding salutation in this locale.
866 The allowed keywords are as follows:
868 .I name_fmt
869 followed by a string containing field descriptors that define
870 the format used for names in the locale.
871 The following field descriptors are recognized:
873 .TP 4
875 Family name(s).
878 Family names in uppercase.
881 First given name.
884 First given initial.
887 First given name with Latin letters.
890 Other shorter name.
893 Additional given name(s).
896 Initials for additional given name(s).
899 Profession.
902 Salutation, such as "Doctor".
905 Abbreviated salutation, such as "Mr." or "Dr.".
908 Salutation, using the FDCC-sets conventions.
909 .\"  1 for the name_gen
910 .\"         In glibc 2.19, %d1 is used in only:
911 .\"             /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
912 .\"             /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
913 .\"         In glibc 2.19, %d[2-5] appear to be not used at all
914 .\"  2 for name_mr
915 .\"  3 for name_mrs
916 .\"  4 for name_miss
917 .\"  5 for name_ms
920 If the preceding field descriptor resulted in an empty string,
921 then the empty string, otherwise a space character.
924 .I name_gen
925 followed by the general salutation for any gender.
927 .I name_mr
928 followed by the salutation for men.
930 .I name_mrs
931 followed by the salutation for married women.
933 .I name_miss
934 followed by the salutation for unmarried women.
936 .I name_ms
937 followed by the salutation valid for all women.
940 .B LC_NAME
941 definition ends with the string
942 .IR "END LC_NAME" .
943 .SS LC_NUMERIC
944 The definition starts with the string
945 .I LC_NUMERIC
946 in the first column.
948 The following keywords are allowed:
950 .I decimal_point
951 followed by the single-character string that will be used as the
952 decimal delimiter when formatting numeric quantities.
954 .I thousands_sep
955 followed by the single-character string that will be used as a group
956 separator when formatting numeric quantities.
958 .I grouping
959 followed by a sequence of integers separated by semicolons
960 that describe the formatting of numeric quantities.
962 Each integer specifies the number of digits in a group.
963 The first integer defines the size of the group immediately
964 to the left of the decimal delimiter.
965 Subsequent integers define succeeding groups to the
966 left of the previous group.
967 If the last integer is not \-1, then the size of the previous group
968 (if any) is repeatedly used for the remainder of the digits.
969 If the last integer is \-1, then no further grouping is performed.
972 .B LC_NUMERIC
973 definition ends with the string
974 .IR "END LC_NUMERIC" .
975 .SS LC_PAPER
976 The definition starts with the string
977 .I LC_PAPER
978 in the first column.
980 The following keywords are allowed:
982 .I height
983 followed by the height, in millimeters, of the standard paper format.
985 .I width
986 followed by the width, in millimeters, of the standard paper format.
989 .B LC_PAPER
990 definition ends with the string
991 .IR "END LC_PAPER" .
992 .SS LC_TELEPHONE
993 The definition starts with the string
994 .I LC_TELEPHONE
995 in the first column.
997 The following keywords are allowed:
999 .I tel_int_fmt
1000 followed by a string that contains field descriptors that identify
1001 the format used to dial international numbers.
1002 The following field descriptors are recognized:
1004 .TP 4
1006 Area code without nationwide prefix (the prefix is often "00").
1009 Area code including nationwide prefix.
1012 Local number (within area code).
1015 Extension (to local number).
1018 Country code.
1021 Alternate carrier service code used for dialing abroad.
1024 If the preceding field descriptor resulted in an empty string,
1025 then the empty string, otherwise a space character.
1028 .I tel_dom_fmt
1029 followed by a string that contains field descriptors that identify
1030 the format used to dial domestic numbers.
1031 The recognized field descriptors are the same as for
1032 .IR tel_int_fmt .
1034 .I int_select
1035 followed by the prefix used to call international phone numbers.
1037 .I int_prefix
1038 followed by the prefix used from other countries to dial this country.
1041 .B LC_TELEPHONE
1042 definition ends with the string
1043 .IR "END LC_TELEPHONE" .
1044 .SS LC_TIME
1045 The definition starts with the string
1046 .I LC_TIME
1047 in the first column.
1049 The following keywords are allowed:
1051 .I abday
1052 followed by a list of abbreviated names of the days of the week.
1053 The list starts with the first day of the week
1054 as specified by
1055 .I week
1056 (Sunday by default).
1057 See NOTES.
1059 .I day
1060 followed by a list of names of the days of the week.
1061 The list starts with the first day of the week
1062 as specified by
1063 .I week
1064 (Sunday by default).
1065 See NOTES.
1067 .I abmon
1068 followed by a list of abbreviated month names.
1070 .I mon
1071 followed by a list of month names.
1073 .I d_t_fmt
1074 followed by the appropriate date and time format
1075 (for syntax, see
1076 .BR strftime (3)).
1078 .I d_fmt
1079 followed by the appropriate date format
1080 (for syntax, see
1081 .BR strftime (3)).
1083 .I t_fmt
1084 followed by the appropriate time format
1085 (for syntax, see
1086 .BR strftime (3)).
1088 .I am_pm
1089 followed by the appropriate representation of the
1090 .B am
1092 .B pm
1093 strings.
1094 This should be left empty for locales not using AM/PM convention.
1096 .I t_fmt_ampm
1097 followed by the appropriate time format
1098 (for syntax, see
1099 .BR strftime (3))
1100 when using 12h clock format.
1101 This should be left empty for locales not using AM/PM convention.
1103 .I era
1104 followed by semicolon-separated strings that define how years are
1105 counted and displayed for each era in the locale.
1106 Each string has the following format:
1109 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1111 The fields are to be defined as follows:
1112 .TP 4
1113 .I direction
1114 Either
1115 .B +
1117 .BR \- .
1118 .B +
1119 means the years closer to
1120 .I start_date
1121 have lower numbers than years closer to
1122 .IR end_date .
1123 .B \-
1124 means the opposite.
1126 .I offset
1127 The number of the year closest to
1128 .I start_date
1129 in the era, corresponding to the
1130 .I %Ey
1131 descriptor (see
1132 .BR strptime (3)).
1134 .I start_date
1135 The start of the era in the form of
1136 .IR yyyy/mm/dd .
1137 Years prior AD 1 are represented as negative numbers.
1139 .I end_date
1140 The end of the era in the form of
1141 .IR yyyy/mm/dd ,
1142 or one of the two special values of
1143 .B \-*
1145 .BR +* .
1146 .B \-*
1147 means the ending date is the beginning of time.
1148 .B +*
1149 means the ending date is the end of time.
1151 .I era_name
1152 The name of the era corresponding to the
1153 .I %EC
1154 descriptor (see
1155 .BR strptime (3)).
1157 .I era_format
1158 The format of the year in the era corresponding to the
1159 .I %EY
1160 descriptor (see
1161 .BR strptime (3)).
1164 .I era_d_fmt
1165 followed by the format of the date in alternative era notation,
1166 corresponding to the
1167 .I %Ex
1168 descriptor (see
1169 .BR strptime (3)).
1171 .I era_t_fmt
1172 followed by the format of the time in alternative era notation,
1173 corresponding to the
1174 .I %EX
1175 descriptor (see
1176 .BR strptime (3)).
1178 .I era_d_t_fmt
1179 followed by the format of the date and time in alternative era notation,
1180 corresponding to the
1181 .I %Ec
1182 descriptor (see
1183 .BR strptime (3)).
1185 .I alt_digits
1186 followed by the alternative digits used for date and time in the locale.
1188 .I week
1189 followed by a list of three values separated by semicolons:
1190 The number of days in a week (by default 7),
1191 a date of beginning of the week (by default corresponds to Sunday),
1192 and the minimal length of the first week in year (by default 4).
1193 Regarding the start of the week,
1194 .B 19971130
1195 shall be used for Sunday and
1196 .B 19971201
1197 shall be used for Monday.
1198 See NOTES.
1200 .IR first_weekday " (since glibc 2.2)"
1201 followed by the number of the day from the
1202 .I day
1203 list to be shown as the first day of the week in calendar applications.
1204 The default value of
1205 .B 1
1206 corresponds to either Sunday or Monday depending
1207 on the value of the second
1208 .I week
1209 list item.
1210 See NOTES.
1212 .IR first_workday " (since glibc 2.2)"
1213 followed by the number of the first working day from the
1214 .I day
1215 list.
1216 The default value is
1217 .BR 2 .
1218 See NOTES.
1220 .I cal_direction
1221 followed by a number value that indicates the direction for the
1222 display of calendar dates, as follows:
1224 .TP 4
1225 .B 1
1226 Left-right from top.
1228 .B 2
1229 Top-down from left.
1231 .B 3
1232 Right-left from top.
1235 .I date_fmt
1236 followed by the appropriate date representation for
1237 .BR date (1)
1238 (for syntax, see
1239 .BR strftime (3)).
1242 .B LC_TIME
1243 definition ends with the string
1244 .IR "END LC_TIME" .
1245 .SH FILES
1247 .I /usr/lib/locale/locale\-archive
1248 Usual default locale archive location.
1250 .I /usr/share/i18n/locales
1251 Usual default path for locale definition files.
1252 .SH STANDARDS
1253 POSIX.2.
1254 .SH NOTES
1255 The collective GNU C library community wisdom regarding
1256 .IR abday ,
1257 .IR day ,
1258 .IR week ,
1259 .IR first_weekday ,
1261 .I first_workday
1262 states at
1263 https://sourceware.org/glibc/wiki/Locales
1264 the following:
1265 .IP \[bu] 3
1266 The value of the second
1267 .I week
1268 list item specifies the base of the
1269 .I abday
1271 .I day
1272 lists.
1273 .IP \[bu]
1274 .I first_weekday
1275 specifies the offset of the first day-of-week in the
1276 .I abday
1278 .I day
1279 lists.
1280 .IP \[bu]
1281 For compatibility reasons, all glibc locales should set the value of the
1282 second
1283 .I week
1284 list item to
1285 .B 19971130
1286 (Sunday) and base the
1287 .I abday
1289 .I day
1290 lists appropriately, and set
1291 .I first_weekday
1293 .I first_workday
1295 .B 1
1297 .BR 2 ,
1298 depending on whether the week and work week actually starts on Sunday or
1299 Monday for the locale.
1300 .\" .SH AUTHOR
1301 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)
1302 .SH SEE ALSO
1303 .BR iconv (1),
1304 .BR locale (1),
1305 .BR localedef (1),
1306 .BR localeconv (3),
1307 .BR newlocale (3),
1308 .BR setlocale (3),
1309 .BR strftime (3),
1310 .BR strptime (3),
1311 .BR uselocale (3),
1312 .BR charmap (5),
1313 .BR charsets (7),
1314 .BR locale (7),
1315 .BR unicode (7),
1316 .BR utf\-8 (7)