OSDN Git Service

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