OSDN Git Service

(split) LDP: Update original to LDP v3.53.
[linuxjm/LDP_man-pages.git] / original / man5 / locale.5
1 .\" Copyright (C) 1994  Jochen Hein (Hein@Student.TU-Clausthal.de)
2 .\" Copyright (C) 2008  Petr Baudis (pasky@suse.cz)
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
5 .\" This program is free software; you can redistribute it and/or modify
6 .\" it under the terms of the GNU General Public License as published by
7 .\" the Free Software Foundation; either version 2 of the License, or
8 .\" (at your option) any later version.
9 .\"
10 .\" This program is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 .\" GNU General Public License for more details.
14 .\"
15 .\" You should have received a copy of the GNU General Public
16 .\" License along with this manual; if not, see
17 .\" <http://www.gnu.org/licenses/>.
18 .\" %%%LICENSE_END
19 .\"
20 .\" 2008-06-17 Petr Baudis <pasky@suse.cz>
21 .\"     LC_TIME: Describe first_weekday and first_workday
22 .\"
23 .TH LOCALE 5 2008-06-17 "Linux" "Linux User Manual"
24 .SH NAME
25 locale \- describes a locale definition file
26 .SH DESCRIPTION
27 The
28 .B locale
29 definition files contains all the information that the
30 .BR localedef (1)
31 command needs to convert it into the binary locale database.
32
33 The definition files consist of sections which each describe a
34 locale category in detail.
35 .SS Syntax
36 The locale definition file starts with a header that may consist
37 of the following keywords:
38 .TP
39 .I <escape_char>
40 is followed by a character that should be used as the
41 escape-character for the rest of the file to mark characters that
42 should be interpreted in a special way.
43 It defaults to the backslash (\\).
44 .TP
45 .I <comment_char>
46 is followed by a character that will be used as the
47 comment-character for the rest of the file.
48 It defaults to the number sign (#).
49 .PP
50 The locale definition has one part for each locale category.
51 Each part can be copied from another existing locale or
52 can be defined from scratch.
53 If the category should be copied,
54 the only valid keyword in the definition is
55 .B copy
56 followed by the name of the locale which should be copied.
57 .\" FIXME glibc 2.2.2 added new nonstandard locale categories:
58 .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
59 .\" LC_PAPER, LC_TELEPHONE.  These need to be documented.
60 .SS LC_CTYPE
61 The definition for the
62 .B LC_CTYPE
63 category starts with the string
64 .I LC_CTYPE
65 in the first column.
66
67 There are the following keywords allowed:
68 .TP
69 .I upper
70 followed by a list of uppercase letters.
71 The letters
72 .B A
73 through
74 .B Z
75 are included automatically.
76 Characters also specified as
77 .BR cntrl ,
78 .BR digit ,
79 .BR punct ,
80 or
81 .B space
82 are not allowed.
83 .TP
84 .I lower
85 followed by a list of lowercase letters.
86 The letters
87 .B a
88 through
89 .B z
90 are included automatically.
91 Characters also specified as
92 .BR cntrl ,
93 .BR digit ,
94 .BR punct ,
95 or
96 .B space
97 are not allowed.
98 .TP
99 .I alpha
100 followed by a list of letters.
101 All character specified as either
102 .B upper
103 or
104 .B lower
105 are automatically included.
106 Characters also specified as
107 .BR cntrl ,
108 .BR digit ,
109 .BR punct ,
110 or
111 .B space
112 are not allowed.
113 .TP
114 .I digit
115 followed by the characters classified as numeric digits.
116 Only the
117 digits
118 .B 0
119 through
120 .B 9
121 are allowed.
122 They are included by default in this class.
123 .TP
124 .I space
125 followed by a list of characters defined as white-space
126 characters.
127 Characters also specified as
128 .BR upper ,
129 .BR lower ,
130 .BR alpha ,
131 .BR digit ,
132 .BR graph ,
133 or
134 .B xdigit
135 are not allowed.
136 The characters
137 .BR <space> ,
138 .BR <form-feed> ,
139 .BR <newline> ,
140 .BR <carriage-return> ,
141 .BR <tab> ,
142 and
143 .B <vertical-tab>
144 are automatically included.
145 .TP
146 .I cntrl
147 followed by a list of control characters.
148 Characters also specified as
149 .BR upper ,
150 .BR lower ,
151 .BR alpha ,
152 .BR digit ,
153 .BR punct ,
154 .BR graph ,
155 .BR print ,
156 or
157 .B xdigit
158 are not allowed.
159 .TP
160 .I punct
161 followed by a list of punctuation characters.
162 Characters also
163 specified as
164 .BR upper ,
165 .BR lower ,
166 .BR alpha ,
167 .BR digit ,
168 .BR cntrl ,
169 .BR xdigit ,
170 or the
171 .B <space>
172 character are not allowed.
173 .TP
174 .I graph
175 followed by a list of printable characters, not including the
176 .B <space>
177 character.
178 The characters defined as
179 .BR upper ,
180 .BR lower ,
181 .BR alpha ,
182 .BR digit ,
183 .BR xdigit ,
184 and
185 .B punct
186 are automatically included.
187 Characters also specified as
188 .B cntrl
189 are not allowed.
190 .TP
191 .I print
192 followed by a list of printable characters, including the
193 .B <space>
194 character.
195 The characters defined as
196 .BR upper ,
197 .BR lower ,
198 .BR alpha ,
199 .BR digit ,
200 .BR xdigit ,
201 .BR punct ,
202 and the
203 .B <space>
204 character are automatically included.
205 Characters also specified as
206 .B cntrl
207 are not allowed.
208 .TP
209 .I xdigit
210 followed by a list of characters classified as hexadecimal
211 digits.
212 The decimal digits must be included followed by one or
213 more set of six characters in ascending order.
214 The following
215 characters are included by default:
216 .B 0
217 through
218 .BR 9 ,
219 .B a
220 through
221 .BR f ,
222 .B A
223 through
224 .BR F .
225 .TP
226 .I blank
227 followed by a list of characters classified as
228 .BR blank .
229 The characters
230 .B <space>
231 and
232 .B <tab>
233 are automatically included.
234 .TP
235 .I toupper
236 followed by a list of mappings from lowercase to uppercase
237 letters.
238 Each mapping is a pair of a lowercase and an uppercase letter
239 separated with a
240 .B ,
241 and enclosed in parentheses.
242 The members of the list are separated
243 with semicolons.
244 .TP
245 .I tolower
246 followed by a list of mappings from uppercase to lowercase
247 letters.
248 If the keyword tolower is not present, the reverse of the
249 toupper list is used.
250 .PP
251 The
252 .B LC_CTYPE
253 definition ends with the string
254 .IR "END LC_CYTPE" .
255 .SS LC_COLLATE
256 The
257 .B LC_COLLATE
258 category defines the rules for collating characters.
259 Due to
260 limitations of libc not all POSIX-options are implemented.
261
262 The definition starts with the string
263 .B LC_COLLATE
264 in the first column.
265
266 There are the following keywords allowed:
267 .TP
268 .I collating-element
269 .TP
270 .I collating-symbol
271 .PP
272 The order-definition starts with a line:
273 .TP
274 .I order_start
275 .PP
276 followed by a list of keywords out of
277 .BR forward ,
278 .BR backward ,
279 or
280 .BR position .
281 The order definition consists of lines that describe the order
282 and is terminated with the keyword
283 .TP
284 .IR order_end .
285 .PP
286 For more details see the sources in
287 .I /usr/lib/nls/src
288 notably the examples
289 .BR POSIX ,
290 .B Example
291 and
292 .B Example2
293 .PP
294 The
295 .B LC_COLLATE
296 definition ends with the string
297 .IR "END LC_COLLATE" .
298 .SS LC_MONETARY
299 The definition starts with the string
300 .B LC_MONETARY
301 in the first column.
302
303 There are the following keywords allowed:
304 .TP
305 .I int_curr_symbol
306 followed by the international currency symbol.
307 This must be a
308 4-character string containing the international currency symbol as
309 defined by the ISO 4217 standard (three characters) followed by a
310 separator.
311 .TP
312 .I currency_symbol
313 followed by the local currency symbol.
314 .TP
315 .I mon_decimal_point
316 followed by the string that will be used as the decimal delimiter
317 when formatting monetary quantities.
318 .TP
319 .I mon_thousands_sep
320 followed by the string that will be used as a group separator
321 when formatting monetary quantities.
322 .TP
323 .I mon_grouping
324 followed by a string that describes the formatting of numeric
325 quantities.
326 .TP
327 .I positive_sign
328 followed by a string that is used to indicate a positive sign for
329 monetary quantities.
330 .TP
331 .I negative_sign
332 followed by a string that is used to indicate a negative sign for
333 monetary quantities.
334 .TP
335 .I int_frac_digits
336 followed by the number of fractional digits that should be used when
337 formatting with the
338 .BR int_curr_symbol .
339 .TP
340 .I frac_digits
341 followed by the number of fractional digits that should be used when
342 formatting with the
343 .BR currency_symbol .
344 .TP
345 .I p_cs_precedes
346 followed by an integer set to
347 .B 1
348 if the
349 .I currency_symbol
350 or
351 .I int_curr_symbol
352 should precede the formatted monetary quantity or set to
353 .B 0
354 if the symbol succeeds the value.
355 .TP
356 .I p_sep_by_space
357 followed by an integer.
358 .RS
359 .TP
360 .B 0
361 means that no space should be printed between the symbol and the
362 value.
363 .TP
364 .B 1
365 means that a space should be printed between the symbol and the
366 value.
367 .TP
368 .B 2
369 means that a space should be printed between the symbol and the
370 sign string, if adjacent.
371 .RE
372 .TP
373 .I n_cs_precedes
374 .RS
375 .TP
376 .B 0
377 - the symbol succeeds the value.
378 .TP
379 .B 1
380 - the symbol precedes the value.
381 .RE
382 .TP
383 .I n_sep_by_space
384 An integer set to
385 .B 0
386 if no space separates the
387 .I currency_symbol
388 or
389 .I int_curr_symbol
390 from the value for a negative monetary quantity, set to
391 .B 1
392 if a space separates the symbol from the value and set to
393 .B 2
394 if a space separates the symbol and the sign string, if adjacent.
395 .TP
396 .I p_sign_posn
397 .RS
398 .TP
399 .B 0
400 Parentheses enclose the quantity and the
401 .I currency_symbol
402 or
403 .IR int_curr_symbol .
404 .TP
405 .B 1
406 The sign string precedes the quantity and the
407 .I currency_symbol
408 or the
409 .IR int_curr_symbol .
410 .TP
411 .B 2
412 The sign string succeeds the quantity and the
413 .I currency_symbol
414 or the
415 .IR int_curr_symbol .
416 .TP
417 .B 3
418 The sign string precedes the
419 .I currency_symbol
420 or the
421 .IR int_curr_symbol .
422 .TP
423 .B 4
424 The sign string succeeds the
425 .I currency_symbol
426 or the
427 .IR int_curr_symbol .
428 .RE
429 .TP
430 .I n_sign_posn
431 .RS
432 .TP
433 .B 0
434 Parentheses enclose the quantity and the
435 .I currency_symbol
436 or
437 .IR int_curr_symbol .
438 .TP
439 .B 1
440 The sign string precedes the quantity and the
441 .I currency_symbol
442 or the
443 .IR int_curr_symbol .
444 .TP
445 .B 2
446 The sign string succeeds the quantity and the
447 .I currency_symbol
448 or the
449 .IR int_curr_symbol .
450 .TP
451 .B 3
452 The sign string precedes the
453 .I currency_symbol
454 or the
455 .IR int_curr_symbol .
456 .TP
457 .B 4
458 The sign string succeeds the
459 .I currency_symbol
460 or the
461 .IR int_curr_symbol .
462 .RE
463 .PP
464 The
465 .B LC_MONETARY
466 definition ends with the string
467 .IR "END LC_MONETARY" .
468 .SS LC_NUMERIC
469 The definition starts with the string
470 .B LC_NUMERIC
471 in the first column.
472
473 The following keywords are allowed:
474 .TP
475 .I decimal_point
476 followed by the string that will be used as the decimal delimiter
477 when formatting numeric quantities.
478 .TP
479 .I thousands_sep
480 followed by the string that will be used as a group separator
481 when formatting numeric quantities.
482 .TP
483 .I grouping
484 followed by a string that describes the formatting of numeric
485 quantities.
486 .PP
487 The
488 .B LC_NUMERIC
489 definition ends with the string
490 .IR "END LC_NUMERIC" .
491 .SS LC_TIME
492 The definition starts with the string
493 .B LC_TIME
494 in the first column.
495
496 The following keywords are allowed:
497 .TP
498 .I abday
499 followed by a list of abbreviated weekday names.
500 The list starts with the first day of the week
501 as specified by
502 .I week
503 (Sunday by default).
504 .TP
505 .I day
506 followed by a list of weekday names.
507 The list starts with the first day of the week
508 as specified by
509 .I week
510 (Sunday by default).
511 .TP
512 .I abmon
513 followed by a list of abbreviated month names.
514 .TP
515 .I mon
516 followed by a list of month names.
517 .TP
518 .I am_pm
519 The appropriate representation of the
520 .B am
521 and
522 .B pm
523 strings.
524 .TP
525 .I d_t_fmt
526 The appropriate date and time format.
527 .TP
528 .I d_fmt
529 The appropriate date format.
530 .TP
531 .I t_fmt
532 The appropriate time format.
533 .TP
534 .I t_fmt_ampm
535 The appropriate time format when using 12h clock format.
536 .TP
537 .I week
538 followed by a list of three values:
539 The number of days in a week (by default 7),
540 a date of beginning of the week (by default corresponds to Sunday),
541 and the minimal length of the first week in year (by default 4).
542 Regarding the start of the week,
543 .B 19971130
544 shall be used for Sunday and
545 .B 19971201
546 shall be used for Monday.
547 Thus, countries using
548 .B 19971130
549 should have local Sunday name as the first day in the
550 .I day
551 list,
552 while countries using
553 .B 19971201
554 should have Monday translation as the first item in the
555 .I day
556 list.
557 .TP
558 .IR first_weekday " (since glibc 2.2)"
559 Number of the first day from the
560 .I day
561 list to be shown in calendar applications.
562 The default value of
563 .B 1
564 corresponds to either Sunday or Monday depending
565 on the value of the second
566 .I week
567 list item.
568 .TP
569 .IR first_workday " (since glibc 2.2)"
570 Number of the first working day from the
571 .I day
572 list.
573 .PP
574 The
575 .B LC_TIME
576 definition ends with the string
577 .IR "END LC_TIME" .
578 .SS LC_MESSAGES
579 The definition starts with the string
580 .B LC_MESSAGES
581 in the first column.
582
583 The following keywords are allowed:
584 .TP
585 .I yesexpr
586 followed by a regular expression that describes possible
587 yes-responses.
588 .TP
589 .I noexpr
590 followed by a regular expression that describes possible
591 no-responses.
592 .PP
593 The
594 .B LC_MESSAGES
595 definition ends with the string
596 .IR "END LC_MESSAGES" .
597
598 See the POSIX.2 standard for details.
599 .SH FILES
600 /usr/lib/locale/
601 \(em database for the current locale setting of that category
602 .br
603 /usr/lib/nls/charmap/* \(em charmap-files
604 .SH CONFORMING TO
605 POSIX.2, ISO/IEC 14652.
606 .SH BUGS
607 This manual page isn't complete.
608 .\" .SH AUTHOR
609 .\" Jochen Hein (Hein@Student.TU-Clausthal.de)
610 .SH SEE ALSO
611 .BR locale (1),
612 .BR localedef (1),
613 .BR localeconv (3),
614 .BR setlocale (3),
615 .BR charmap (5)