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