]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man5/locale.5
locale(5): country_car: Add a better description
[thirdparty/man-pages.git] / man5 / locale.5
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>
5 .\"
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.
11 .\"
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.
16 .\"
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/>.
20 .\" %%%LICENSE_END
21 .\"
22 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
23 .\" LC_TIME: Describe first_weekday and first_workday
24 .\"
25 .TH LOCALE 5 2016-03-15 "Linux" "Linux User Manual"
26 .SH NAME
27 locale \- describes a locale definition file
28 .SH DESCRIPTION
29 The
30 .B locale
31 definition file contains all the information that the
32 .BR localedef (1)
33 command needs to convert it into the binary locale database.
34
35 The definition files consist of sections which each describe a
36 locale category in detail.
37 See
38 .BR locale (7)
39 for additional details for these categories.
40 .SS Syntax
41 The locale definition file starts with a header that may consist
42 of the following keywords:
43 .TP
44 .I <escape_char>
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 (\\).
49 .TP
50 .I <comment_char>
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 (#).
54 .PP
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
60 .B copy
61 followed by the name of the locale in double quotes which should be
62 copied.
63 The exceptions for this rule are
64 .B LC_COLLATE
65 and
66 .B LC_CTYPE
67 where a
68 .B copy
69 statement can be followed by locale-specific rules and selected overrides.
70 .PP
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
79 .BR LC_CTYPE
80 and
81 .BR LC_COLLATE
82 follow special formatting, see the system-provided locale files for
83 examples).
84 .SS Locale category sections
85 The following category sections are defined by POSIX:
86 .IP * 3
87 .B LC_CTYPE
88 .IP *
89 .B LC_COLLATE
90 .IP *
91 .B LC_MESSAGES
92 .IP *
93 .B LC_MONETARY
94 .IP *
95 .B LC_NUMERIC
96 .IP *
97 .B LC_TIME
98 .PP
99 In addition, since version 2.2,
100 the GNU C library supports the following nonstandard categories:
101 .IP * 3
102 .B LC_ADDRESS
103 .IP *
104 .B LC_IDENTIFICATION
105 .IP *
106 .B LC_MEASUREMENT
107 .IP *
108 .B LC_NAME
109 .IP *
110 .B LC_PAPER
111 .IP *
112 .B LC_TELEPHONE
113 .PP
114 See
115 .BR locale (7)
116 for a more detailed description of each category.
117 .\"
118 .SS LC_ADDRESS
119 The definition starts with the string
120 .I LC_ADDRESS
121 in the first column.
122
123 The following keywords are allowed:
124 .\" Thanks to the kind folk who wrote localedata/locales/uk_UA
125 .TP
126 .I postal_fmt
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:
130 .RS
131 .TP
132 %n
133 Person's name, possibly constructed with the
134 .B LC_NAME
135 .I name_fmt
136 keyword (since glibc 2.24).
137 .TP 4
138 %a
139 Care of person, or organization.
140 .TP
141 %f
142 Firm name.
143 .TP
144 %d
145 Department name.
146 .TP
147 %b
148 Building name.
149 .TP
150 %s
151 Street or block (e.g., Japanese) name.
152 .TP
153 %h
154 House number or designation.
155 .TP
156 %N
157 Insert an end-of-line if the previous descriptor's value was not an empty
158 string; otherwise ignore.
159 .TP
160 %t
161 Insert a space if the previous descriptor's value was not an empty string;
162 otherwise ignore.
163 .TP
164 %r
165 Room number, door designation.
166 .TP
167 %e
168 Floor number.
169 .TP
170 %C
171 Country designation, from the <country_post> keyword.
172 .TP
173 %l
174 Local township within town or city (since glibc 2.24).
175 .TP
176 %z
177 Zip number, postal code.
178 .TP
179 %T
180 Town, city.
181 .TP
182 %S
183 State, province, or prefecture.
184 .TP
185 %c
186 Country, as taken from data record.
187 .PP
188 Each field descriptor may have an \(aqR\(aq after
189 the \(aq%\(aq to specify that the
190 information is taken from a Romanized version string of the
191 entity.
192 .RE
193 .TP
194 .I country_name
195 followed by the country name in the language of the current document
196 (e.g., "Deutschland" for the
197 .IR de_DE
198 locale).
199 .TP
200 .I country_post
201 followed by the abbreviation of the country (see CERT_MAILCODES).
202 .TP
203 .I country_ab2
204 followed by the two-letter abbreviation of the country (ISO 3166).
205 .TP
206 .I country_ab3
207 followed by the three-letter abbreviation of the country (ISO 3166).
208 .TP
209 .I country_num
210 followed by the numeric country code as plain numbers (ISO 3166).
211 .TP
212 .I country_car
213 followed by the international licence plate country code.
214 .TP
215 .I country_isbn
216 followed by the ISBN code (for books).
217 .TP
218 .I lang_name
219 followed by the language name in the language of the current document.
220 .TP
221 .I lang_ab
222 followed by the two-letter abbreviation of the language (ISO 639).
223 .TP
224 .I lang_term
225 followed by the three-letter abbreviation of the language (ISO 639-2/T).
226 .TP
227 .I lang_lib
228 followed by the three-letter abbreviation of the language for library
229 use (ISO 639-2/B).
230 Applications should in general prefer
231 .IR lang_term
232 over
233 .IR lang_lib .
234 .PP
235 The
236 .B LC_ADDRESS
237 definition ends with the string
238 .IR "END LC_ADDRESS" .
239 .SS LC_CTYPE
240 The definition starts with the string
241 .I LC_CTYPE
242 in the first column.
243
244 The following keywords are allowed:
245 .TP
246 .I upper
247 followed by a list of uppercase letters.
248 The letters
249 .B A
250 through
251 .B Z
252 are included automatically.
253 Characters also specified as
254 .BR cntrl ,
255 .BR digit ,
256 .BR punct ,
257 or
258 .B space
259 are not allowed.
260 .TP
261 .I lower
262 followed by a list of lowercase letters.
263 The letters
264 .B a
265 through
266 .B z
267 are included automatically.
268 Characters also specified as
269 .BR cntrl ,
270 .BR digit ,
271 .BR punct ,
272 or
273 .B space
274 are not allowed.
275 .TP
276 .I alpha
277 followed by a list of letters.
278 All character specified as either
279 .B upper
280 or
281 .B lower
282 are automatically included.
283 Characters also specified as
284 .BR cntrl ,
285 .BR digit ,
286 .BR punct ,
287 or
288 .B space
289 are not allowed.
290 .TP
291 .I digit
292 followed by the characters classified as numeric digits.
293 Only the
294 digits
295 .B 0
296 through
297 .B 9
298 are allowed.
299 They are included by default in this class.
300 .TP
301 .I space
302 followed by a list of characters defined as white-space
303 characters.
304 Characters also specified as
305 .BR upper ,
306 .BR lower ,
307 .BR alpha ,
308 .BR digit ,
309 .BR graph ,
310 or
311 .B xdigit
312 are not allowed.
313 The characters
314 .BR <space> ,
315 .BR <form-feed> ,
316 .BR <newline> ,
317 .BR <carriage-return> ,
318 .BR <tab> ,
319 and
320 .B <vertical-tab>
321 are automatically included.
322 .TP
323 .I cntrl
324 followed by a list of control characters.
325 Characters also specified as
326 .BR upper ,
327 .BR lower ,
328 .BR alpha ,
329 .BR digit ,
330 .BR punct ,
331 .BR graph ,
332 .BR print ,
333 or
334 .B xdigit
335 are not allowed.
336 .TP
337 .I punct
338 followed by a list of punctuation characters.
339 Characters also
340 specified as
341 .BR upper ,
342 .BR lower ,
343 .BR alpha ,
344 .BR digit ,
345 .BR cntrl ,
346 .BR xdigit ,
347 or the
348 .B <space>
349 character are not allowed.
350 .TP
351 .I graph
352 followed by a list of printable characters, not including the
353 .B <space>
354 character.
355 The characters defined as
356 .BR upper ,
357 .BR lower ,
358 .BR alpha ,
359 .BR digit ,
360 .BR xdigit ,
361 and
362 .B punct
363 are automatically included.
364 Characters also specified as
365 .B cntrl
366 are not allowed.
367 .TP
368 .I print
369 followed by a list of printable characters, including the
370 .B <space>
371 character.
372 The characters defined as
373 .BR upper ,
374 .BR lower ,
375 .BR alpha ,
376 .BR digit ,
377 .BR xdigit ,
378 .BR punct ,
379 and the
380 .B <space>
381 character are automatically included.
382 Characters also specified as
383 .B cntrl
384 are not allowed.
385 .TP
386 .I xdigit
387 followed by a list of characters classified as hexadecimal
388 digits.
389 The decimal digits must be included followed by one or
390 more set of six characters in ascending order.
391 The following
392 characters are included by default:
393 .B 0
394 through
395 .BR 9 ,
396 .B a
397 through
398 .BR f ,
399 .B A
400 through
401 .BR F .
402 .TP
403 .I blank
404 followed by a list of characters classified as
405 .BR blank .
406 The characters
407 .B <space>
408 and
409 .B <tab>
410 are automatically included.
411 .TP
412 .I charclass
413 followed by a list of locale-specific character class names
414 which are then to be defined in the locale.
415 .TP
416 .I toupper
417 followed by a list of mappings from lowercase to uppercase
418 letters.
419 Each mapping is a pair of a lowercase and an uppercase letter
420 separated with a
421 .B ,
422 and enclosed in parentheses.
423 The members of the list are separated
424 with semicolons.
425 .TP
426 .I tolower
427 followed by a list of mappings from uppercase to lowercase
428 letters.
429 If the keyword tolower is not present, the reverse of the
430 toupper list is used.
431 .TP
432 .I map totitle
433 followed by a list of mapping pairs of
434 characters and letters
435 to be used in titles (headings).
436 .TP
437 .I class
438 followed by a locale-specific character class definition,
439 starting with the class name followed by the characters
440 belonging to the class.
441 .TP
442 .I charconv
443 followed by a list of locale-specific character mapping names
444 which are then to be defined in the locale.
445 .TP
446 .I outdigit
447 followed by a list of alternate output digits for the locale.
448 .TP
449 .I map to_inpunct
450 followed by a list of mapping pairs of
451 alternate digits and separators
452 for input digits for the locale.
453 .TP
454 .I map to_outpunct
455 followed by a list of mapping pairs of
456 alternate separators
457 for output for the locale.
458 .TP
459 .I translit_start
460 marks the start of the transliteration rules section.
461 The section can contain the
462 .I include
463 keyword in the beginning followed by
464 locale-specific rules and overrides.
465 Any rule specified in the locale file
466 will override any rule
467 copied or included from other files.
468 In case of duplicate rule definitions in the locale file,
469 only the first rule is used.
470
471 A transliteration rule consist of a character to be transliterated
472 followed by a list of transliteration targets separated by semicolons.
473 The first target which can be presented in the target character set
474 is used, if none of them can be used the
475 .I default_missing
476 character will be used instead.
477 .TP
478 .I include
479 in the transliteration rules section includes
480 a transliteration rule file
481 (and optionally a repertoire map file).
482 .TP
483 .I default_missing
484 in the transliteration rules section
485 defines the default character to be used for
486 transliteration where none of the targets cannot be presented
487 in the target character set.
488 .TP
489 .I translit_end
490 marks the end of the transliteration rules.
491 .PP
492 The
493 .B LC_CTYPE
494 definition ends with the string
495 .IR "END LC_CTYPE" .
496 .SS LC_COLLATE
497 Due to limitations of glibc not all POSIX-options are implemented.
498
499 The definition starts with the string
500 .I LC_COLLATE
501 in the first column.
502
503 The following keywords are allowed:
504 .\" FIXME The following LC_COLLATE keywords are not documented:
505 .\" reorder-after
506 .\" reorder-end
507 .\" reorder-sections-after
508 .\" reorder-sections-end
509 .\" script
510 .\" symbol-equivalence
511 .TP
512 .I collating-element
513 followed by the definition of a collating-element symbol
514 representing a multicharacter collating element.
515 .TP
516 .I collating-symbol
517 followed by the definition of a collating symbol
518 that can be used in collation order statements.
519 .PP
520 The order-definition starts with a line:
521 .TP
522 .I order_start
523 followed by a list of keywords chosen from
524 .BR forward ,
525 .BR backward ,
526 or
527 .BR position .
528 The order definition consists of lines that describe the order
529 and is terminated with the keyword
530 .IR order_end .
531 .PP
532 The
533 .B LC_COLLATE
534 definition ends with the string
535 .IR "END LC_COLLATE" .
536 .SS LC_IDENTIFICATION
537 The definition starts with the string
538 .I LC_IDENTIFICATION
539 in the first column.
540
541 The values in this category are defined as plain strings.
542
543 The following keywords are allowed:
544 .TP
545 .I title
546 followed by the title of the locale document
547 (e.g., "Maori language locale for New Zealand").
548 .TP
549 .I source
550 followed by the name of the organization that maintains this document.
551 .TP
552 .I address
553 followed by the address of the organization that maintains this document.
554 .TP
555 .I contact
556 followed by the name of the contact person at
557 the organization that maintains this document.
558 .TP
559 .I email
560 followed by the email address of the person or
561 organization that maintains this document.
562 .TP
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.
568 .TP
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.
574 .TP
575 .I language
576 followed by the name of the language to which this document applies.
577 .TP
578 .I territory
579 followed by the name of the country/geographic extent
580 to which this document applies.
581 .TP
582 .I audience
583 followed by a description of the audience for which this document is intended.
584 .TP
585 .I application
586 followed by a description of any special application
587 for which this document is intended.
588 .TP
589 .I abbreviation
590 followed by the short name for provider of the source of this document.
591 .TP
592 .I revision
593 followed by the revision number of this document.
594 .TP
595 .I date
596 followed by the revision date of this document.
597 .PP
598 In addition, for each of the categories defined by the document,
599 there should be a line starting with the keyword
600 .IR category ,
601 followed by:
602 .IP * 3
603 a string that identifies this locale category definition,
604 .IP *
605 a semicolon, and
606 .IP *
607 one of the
608 .BI LC_ *
609 identifiers.
610 .PP
611 The
612 .B LC_IDENTIFICATION
613 definition ends with the string
614 .IR "END LC_IDENTIFICATION" .
615 .SS LC_MESSAGES
616 The definition starts with the string
617 .I LC_MESSAGES
618 in the first column.
619
620 The following keywords are allowed:
621 .TP
622 .I yesexpr
623 followed by a regular expression that describes possible
624 yes-responses.
625 .TP
626 .I noexpr
627 followed by a regular expression that describes possible
628 no-responses.
629 .TP
630 .I yesstr
631 followed by the output string corresponding to "yes".
632 .TP
633 .I nostr
634 followed by the output string corresponding to "no".
635 .PP
636 The
637 .B LC_MESSAGES
638 definition ends with the string
639 .IR "END LC_MESSAGES" .
640 .SS LC_MEASUREMENT
641 The definition starts with the string
642 .I LC_MEASUREMENT
643 in the first column.
644
645 The following keywords are allowed:
646 .TP
647 .I measurement
648 followed by number identifying the standard used for measurement.
649 The following values are recognized:
650 .RS
651 .TP 4
652 .B 1
653 Metric.
654 .TP
655 .B 2
656 US customary measurements.
657 .RE
658 .PP
659 The
660 .B LC_MEASUREMENT
661 definition ends with the string
662 .IR "END LC_MEASUREMENT" .
663 .SS LC_MONETARY
664 The definition starts with the string
665 .I LC_MONETARY
666 in the first column.
667
668 Values for
669 .IR int_curr_symbol ,
670 .IR currency_symbol ,
671 .IR mon_decimal_point ,
672 .IR mon_thousands_sep ,
673 .IR positive_sign ,
674 and
675 .IR negative_sign
676 are defined as Unicode code points, the others as plain numbers.
677
678 The following keywords are allowed:
679 .TP
680 .I int_curr_symbol
681 followed by the international currency symbol.
682 This must be a
683 4-character string containing the international currency symbol as
684 defined by the ISO 4217 standard (three characters) followed by a
685 separator.
686 .TP
687 .I currency_symbol
688 followed by the local currency symbol.
689 .TP
690 .I mon_decimal_point
691 followed by the string that will be used as the decimal delimiter
692 when formatting monetary quantities.
693 .TP
694 .I mon_thousands_sep
695 followed by the string that will be used as a group separator
696 when formatting monetary quantities.
697 .TP
698 .I mon_grouping
699 followed by a sequence of integers separated by semicolons that
700 describe the formatting of monetary quantities.
701 See
702 .I grouping
703 below for details.
704 .TP
705 .I positive_sign
706 followed by a string that is used to indicate a positive sign for
707 monetary quantities.
708 .TP
709 .I negative_sign
710 followed by a string that is used to indicate a negative sign for
711 monetary quantities.
712 .TP
713 .I int_frac_digits
714 followed by the number of fractional digits that should be used when
715 formatting with the
716 .IR int_curr_symbol .
717 .TP
718 .I frac_digits
719 followed by the number of fractional digits that should be used when
720 formatting with the
721 .IR currency_symbol .
722 .TP
723 .I p_cs_precedes
724 followed by an integer that indicates the placement of
725 .I currency_symbol
726 for a nonnegative formatted monetary quantity:
727 .RS
728 .TP 4
729 .B 0
730 the symbol succeeds the value.
731 .TP
732 .B 1
733 the symbol precedes the value.
734 .RE
735 .TP
736 .I p_sep_by_space
737 followed by an integer that indicates the separation of
738 .IR currency_symbol ,
739 the sign string, and the value for a nonnegative formatted monetary quantity.
740 The following values are recognized:
741 .RS
742 .TP 4
743 .B 0
744 No space separates the currency symbol and the value.
745 .TP
746 .B 1
747 If the currency symbol and the sign string are adjacent,
748 a space separates them from the value;
749 otherwise a space separates the currency symbol and the value.
750 .TP
751 .B 2
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 sign string and the value.
755 .RE
756 .TP
757 .I n_cs_precedes
758 followed by an integer that indicates the placement of
759 .I currency_symbol
760 for a negative formatted monetary quantity.
761 The same values are recognized as for
762 .IR p_cs_precedes .
763 .TP
764 .I n_sep_by_space
765 followed by an integer that indicates the separation of
766 .IR currency_symbol ,
767 the sign string, and the value for a negative formatted monetary quantity.
768 The same values are recognized as for
769 .IR p_sep_by_space .
770 .TP
771 .I p_sign_posn
772 followed by an integer that indicates where the
773 .I positive_sign
774 should be placed for a nonnegative monetary quantity:
775 .RS
776 .TP 4
777 .B 0
778 Parentheses enclose the quantity and the
779 .I currency_symbol
780 or
781 .IR int_curr_symbol .
782 .TP
783 .B 1
784 The sign string precedes the quantity and the
785 .I currency_symbol
786 or the
787 .IR int_curr_symbol .
788 .TP
789 .B 2
790 The sign string succeeds the quantity and the
791 .I currency_symbol
792 or the
793 .IR int_curr_symbol .
794 .TP
795 .B 3
796 The sign string precedes the
797 .I currency_symbol
798 or the
799 .IR int_curr_symbol .
800 .TP
801 .B 4
802 The sign string succeeds the
803 .I currency_symbol
804 or the
805 .IR int_curr_symbol .
806 .RE
807 .TP
808 .I n_sign_posn
809 followed by an integer that indicates where the
810 .I negative_sign
811 should be placed for a negative monetary quantity.
812 The same values are recognized as for
813 .IR p_sign_posn .
814 .TP
815 .I int_p_cs_precedes
816 followed by an integer that indicates the placement of
817 .I int_currency_symbol
818 for a nonnegative internationally formatted monetary quantity.
819 The same values are recognized as for
820 .IR p_cs_precedes .
821 .TP
822 .I int_n_cs_precedes
823 followed by an integer that indicates the placement of
824 .I int_currency_symbol
825 for a negative internationally formatted monetary quantity.
826 The same values are recognized as for
827 .IR p_cs_precedes .
828 .TP
829 .I int_p_sep_by_space
830 followed by an integer that indicates the separation of
831 .IR int_currency_symbol ,
832 the sign string,
833 and the value for a nonnegative internationally formatted monetary quantity.
834 The same values are recognized as for
835 .IR p_sep_by_space .
836 .TP
837 .I int_n_sep_by_space
838 followed by an integer that indicates the separation of
839 .IR int_currency_symbol ,
840 the sign string,
841 and the value for a negative internationally formatted monetary quantity.
842 The same values are recognized as for
843 .IR p_sep_by_space .
844 .TP
845 .I int_p_sign_posn
846 followed by an integer that indicates where the
847 .I positive_sign
848 should be placed for a nonnegative
849 internationally formatted monetary quantity.
850 The same values are recognized as for
851 .IR p_sign_posn .
852 .TP
853 .I int_n_sign_posn
854 followed by an integer that indicates where the
855 .I negative_sign
856 should be placed for a negative
857 internationally formatted monetary quantity.
858 The same values are recognized as for
859 .IR p_sign_posn .
860 .PP
861 The
862 .B LC_MONETARY
863 definition ends with the string
864 .IR "END LC_MONETARY" .
865 .SS LC_NAME
866 The definition starts with the string
867 .I LC_NAME
868 in the first column.
869
870 Various keywords are allowed, but only
871 .IR name_fmt
872 is mandatory.
873 Other keywords are needed only if there is common convention to
874 use the corresponding salutation in this locale.
875 The allowed keywords are as follows:
876 .TP
877 .I name_fmt
878 followed by a string containing field descriptors that define
879 the format used for names in the locale.
880 The following field descriptors are recognized:
881 .\" From localedata/locales/uk_UA:
882 .RS
883 .TP 4
884 %f
885 Family name(s).
886 .TP
887 %F
888 Family names in uppercase.
889 .TP
890 %g
891 First given name.
892 .TP
893 %G
894 First given initial.
895 .TP
896 %l
897 First given name with Latin letters.
898 .TP
899 %o
900 Other shorter name.
901 .TP
902 %m
903 Additional given name(s).
904 .TP
905 %M
906 Initials for additional given name(s).
907 .TP
908 %p
909 Profession.
910 .TP
911 %s
912 Salutation, such as "Doctor".
913 .TP
914 %S
915 Abbreviated salutation, such as "Mr." or "Dr.".
916 .TP
917 %d
918 Salutation, using the FDCC-sets conventions.
919 .\" 1 for the name_gen
920 .\" In glibc 2.19, %d1 is used in only:
921 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/bem_ZM
922 .\" /home/mtk/ARCHIVE/GLIBC/glibc-2.19/localedata/locales/zh_HK
923 .\" In glibc 2.19, %d[2-5] appear to be not used at all
924 .\" 2 for name_mr
925 .\" 3 for name_mrs
926 .\" 4 for name_miss
927 .\" 5 for name_ms
928 .TP
929 %t
930 If the preceding field descriptor resulted in an empty string,
931 then the empty string, otherwise a space character.
932 .RE
933 .TP
934 .I name_gen
935 followed by the general salutation for any gender.
936 .TP
937 .I name_mr
938 followed by the salutation for men.
939 .TP
940 .I name_mrs
941 followed by the salutation for married women.
942 .TP
943 .I name_miss
944 followed by the salutation for unmarried women.
945 .TP
946 .I name_ms
947 followed by the salutation valid for all women.
948 .PP
949 The
950 .B LC_NAME
951 definition ends with the string
952 .IR "END LC_NAME" .
953 .SS LC_NUMERIC
954 The definition starts with the string
955 .I LC_NUMERIC
956 in the first column.
957
958 The following keywords are allowed:
959 .TP
960 .I decimal_point
961 followed by the string that will be used as the decimal delimiter
962 when formatting numeric quantities.
963 .TP
964 .I thousands_sep
965 followed by the string that will be used as a group separator
966 when formatting numeric quantities.
967 .TP
968 .I grouping
969 followed by a sequence of integers as plain numbers separated by
970 semicolons that describe the formatting of numeric quantities.
971 .IP
972 Each integer specifies the number of digits in a group.
973 The first integer defines the size of the group immediately
974 to the left of the decimal delimiter.
975 Subsequent integers define succeeding groups to the
976 left of the previous group.
977 If the last integer is not \-1, then the size of the previous group
978 (if any) is repeatedly used for the remainder of the digits.
979 If the last integer is \-1, then no further grouping is performed.
980 .PP
981 The
982 .B LC_NUMERIC
983 definition ends with the string
984 .IR "END LC_NUMERIC" .
985 .SS LC_PAPER
986 The definition starts with the string
987 .I LC_PAPER
988 in the first column.
989
990 Values in this category are defined as plain numbers.
991
992 The following keywords are allowed:
993 .TP
994 .I height
995 followed by the height, in millimeters, of the standard paper format.
996 .TP
997 .I width
998 followed by the width, in millimeters, of the standard paper format.
999 .PP
1000 The
1001 .B LC_PAPER
1002 definition ends with the string
1003 .IR "END LC_PAPER" .
1004 .SS LC_TELEPHONE
1005 The definition starts with the string
1006 .I LC_TELEPHONE
1007 in the first column.
1008
1009 The following keywords are allowed:
1010 .TP
1011 .I tel_int_fmt
1012 followed by a string that contains field descriptors that identify
1013 the format used to dial international numbers.
1014 The following field descriptors are recognized:
1015 .\" From localedata/locales/uk_UA
1016 .RS
1017 .TP 4
1018 %a
1019 Area code without nationwide prefix (the prefix is often "00").
1020 .TP
1021 %A
1022 Area code including nationwide prefix.
1023 .TP
1024 %l
1025 Local number (within area code).
1026 .TP
1027 %e
1028 Extension (to local number).
1029 .TP
1030 %c
1031 Country code.
1032 .TP
1033 %C
1034 Alternate carrier service code used for dialing abroad.
1035 .TP
1036 %t
1037 If the preceding field descriptor resulted in an empty string,
1038 then the empty string, otherwise a space character.
1039 .RE
1040 .TP
1041 .I tel_dom_fmt
1042 followed by a string that contains field descriptors that identify
1043 the format used to dial domestic numbers.
1044 The recognized field descriptors are the same as for
1045 .IR tel_int_fmt .
1046 .TP
1047 .I int_select
1048 followed by the prefix used to call international phone numbers.
1049 .TP
1050 .I int_prefix
1051 followed by the prefix used from other countries to dial this country.
1052 .PP
1053 The
1054 .B LC_TELEPHONE
1055 definition ends with the string
1056 .IR "END LC_TELEPHONE" .
1057 .SS LC_TIME
1058 The definition starts with the string
1059 .I LC_TIME
1060 in the first column.
1061
1062 The following keywords are allowed:
1063 .TP
1064 .I abday
1065 followed by a list of abbreviated names of the days of the week.
1066 The list starts with the first day of the week
1067 as specified by
1068 .I week
1069 (Sunday by default).
1070 See NOTES.
1071 .TP
1072 .I day
1073 followed by a list of names of the days of the week.
1074 The list starts with the first day of the week
1075 as specified by
1076 .I week
1077 (Sunday by default).
1078 See NOTES.
1079 .TP
1080 .I abmon
1081 followed by a list of abbreviated month names.
1082 .TP
1083 .I mon
1084 followed by a list of month names.
1085 .TP
1086 .I d_t_fmt
1087 followed by the appropriate date and time format
1088 (for syntax, see
1089 .BR strftime (3)).
1090 .TP
1091 .I d_fmt
1092 followed by the appropriate date format
1093 (for syntax, see
1094 .BR strftime (3)).
1095 .TP
1096 .I t_fmt
1097 followed by the appropriate time format
1098 (for syntax, see
1099 .BR strftime (3)).
1100 .TP
1101 .I am_pm
1102 followed by the appropriate representation of the
1103 .B am
1104 and
1105 .B pm
1106 strings.
1107 This should be left empty for locales not using AM/PM convention.
1108 .TP
1109 .I t_fmt_ampm
1110 followed by the appropriate time format
1111 (for syntax, see
1112 .BR strftime (3))
1113 when using 12h clock format.
1114 This should be left empty for locales not using AM/PM convention.
1115 .TP
1116 .I era
1117 followed by semicolon-separated strings that define how years are
1118 counted and displayed for each era in the locale.
1119 Each string has the following format:
1120 .RS
1121 .PP
1122 .IR direction ":" offset ":" start_date ":" end_date ":" era_name ":" era_format
1123 .PP
1124 The fields are to be defined as follows:
1125 .PP
1126 .TP 4
1127 .I direction
1128 Either
1129 .BR +
1130 or
1131 .BR -.
1132 .BR +
1133 means the years closer to
1134 .IR start_date
1135 have lower numbers than years closer to
1136 .IR end_date .
1137 .BR -
1138 means the opposite.
1139 .TP
1140 .I offset
1141 The number of the year closest to
1142 .IR start_date
1143 in the era, corresponding to the
1144 .IR %Ey
1145 descriptor (see
1146 .BR strptime (3)).
1147 .TP
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.
1152 .TP
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 .BR -*
1158 or
1159 .BR +* .
1160 .BR -*
1161 means the ending date is the beginning of time.
1162 .BR +*
1163 means the ending date is the end of time.
1164 .TP
1165 .I era_name
1166 The name of the era corresponding to the
1167 .I %EC
1168 descriptor (see
1169 .BR strptime (3)).
1170 .TP
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)).
1176 .RE
1177 .TP
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)).
1184 .TP
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)).
1191 .TP
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)).
1198 .TP
1199 .I alt_digits
1200 followed by the alternative digits used for date and time in the locale.
1201 .TP
1202 .I week
1203 followed by a list of three values as plain numbers:
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.
1213 .TP
1214 .IR first_weekday " (since glibc 2.2)"
1215 followed by the number of the first day from the
1216 .I day
1217 list to be shown in calendar applications.
1218 The default value of
1219 .B 1
1220 (plain number) corresponds to either Sunday or Monday depending
1221 on the value of the second
1222 .I week
1223 list item.
1224 See NOTES.
1225 .TP
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 (plain number).
1233 See NOTES.
1234 .TP
1235 .I cal_direction
1236 .\" from localedata/locales/uk_UA
1237 followed by a plain number value that indicates the direction for the
1238 display of calendar dates, as follows:
1239 .RS
1240 .TP 4
1241 .B 1
1242 Left-right from top.
1243 .TP
1244 .B 2
1245 Top-down from left.
1246 .TP
1247 .B 3
1248 Right-left from top.
1249 .RE
1250 .TP
1251 .I date_fmt
1252 followed by the appropriate date representation for
1253 .BR date (1)
1254 (for syntax, see
1255 .BR strftime (3)).
1256 .PP
1257 The
1258 .B LC_TIME
1259 definition ends with the string
1260 .IR "END LC_TIME" .
1261 .SH FILES
1262 .TP
1263 .I /usr/lib/locale/locale-archive
1264 Usual default locale archive location.
1265 .TP
1266 .I /usr/share/i18n/locales
1267 Usual default path for locale definition files.
1268 .SH CONFORMING TO
1269 POSIX.2, ISO/IEC TR 14652.
1270 .SH NOTES
1271 The collective GNU C library community wisdom regarding
1272 .IR abday ,
1273 .IR day ,
1274 .IR week ,
1275 .IR first_weekday ,
1276 and
1277 .I first_workday
1278 states at
1279 https://sourceware.org/glibc/wiki/Locales
1280 the following:
1281 .IP * 3
1282 The value of the second
1283 .I week
1284 list item specifies the base of the
1285 .I abday
1286 and
1287 .I day
1288 lists.
1289 .IP *
1290 .I first_weekday
1291 specifies the offset of the first day-of-week in the
1292 .I abday
1293 and
1294 .I day
1295 lists.
1296 .IP *
1297 For compatibility reasons, all glibc locales should set the value of the
1298 second
1299 .I week
1300 list item to
1301 .B 19971130
1302 (Sunday) and base the
1303 .I abday
1304 and
1305 .I day
1306 lists appropriately, and set
1307 .I first_weekday
1308 and
1309 .I first_workday
1310 to
1311 .B 1
1312 or
1313 .BR 2 ,
1314 depending on whether the week and work week actually starts on Sunday or
1315 Monday for the locale.
1316 .\" .SH AUTHOR
1317 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)
1318 .SH SEE ALSO
1319 .BR iconv (1),
1320 .BR locale (1),
1321 .BR localedef (1),
1322 .BR localeconv (3),
1323 .BR newlocale (3),
1324 .BR setlocale (3),
1325 .BR strftime (3),
1326 .BR strptime (3),
1327 .BR uselocale (3),
1328 .BR charmap (5),
1329 .BR charsets (7),
1330 .BR locale (7),
1331 .BR unicode (7),
1332 .BR utf-8 (7)