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