]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de) |
33af8501 | 2 | .\" Copyright (C) 2008 Petr Baudis (pasky@suse.cz) |
fea681da | 3 | .\" |
f0008367 | 4 | .\" %%%LICENSE_START(GPLv2+_SW_3_PARA) |
fea681da MK |
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 | .\" | |
c715f741 MK |
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/>. | |
8ff7380d | 18 | .\" %%%LICENSE_END |
fea681da | 19 | .\" |
33af8501 MK |
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" | |
fea681da | 24 | .SH NAME |
f68512e9 | 25 | locale \- describes a locale definition file |
fea681da | 26 | .SH DESCRIPTION |
c13182ef | 27 | The |
fea681da MK |
28 | .B locale |
29 | definition files contains all the information that the | |
c13182ef | 30 | .BR localedef (1) |
fea681da MK |
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. | |
23618627 | 35 | .SS Syntax |
fea681da MK |
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 | |
c13182ef | 42 | should be interpreted in a special way. |
74d32233 | 43 | It defaults to the backslash (\\). |
fea681da MK |
44 | .TP |
45 | .I <comment_char> | |
46 | is followed by a character that will be used as the | |
c13182ef | 47 | comment-character for the rest of the file. |
74d32233 | 48 | It defaults to the number sign (#). |
fea681da MK |
49 | .PP |
50 | The locale definition has one part for each locale category. | |
51 | Each part can be copied from another existing locale or | |
c13182ef MK |
52 | can be defined from scratch. |
53 | If the category should be copied, | |
fea681da MK |
54 | the only valid keyword in the definition is |
55 | .B copy | |
56 | followed by the name of the locale which should be copied. | |
c8f2dd47 | 57 | .\" FIXME glibc 2.2.2 added new nonstandard locale categories: |
b32d8767 MK |
58 | .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, |
59 | .\" LC_PAPER, LC_TELEPHONE. These need to be documented. | |
fea681da | 60 | .SS LC_CTYPE |
c13182ef | 61 | The definition for the |
fea681da | 62 | .B LC_CTYPE |
c13182ef MK |
63 | category starts with the string |
64 | .I LC_CTYPE | |
fea681da MK |
65 | in the first column. |
66 | ||
67 | There are the following keywords allowed: | |
fea681da MK |
68 | .TP |
69 | .I upper | |
c13182ef MK |
70 | followed by a list of uppercase letters. |
71 | The letters | |
fea681da | 72 | .B A |
b30df7b1 | 73 | through |
fea681da | 74 | .B Z |
c13182ef MK |
75 | are included automatically. |
76 | Characters also specified as | |
fea681da MK |
77 | .BR cntrl , |
78 | .BR digit , | |
79 | .BR punct , | |
80 | or | |
81 | .B space | |
82 | are not allowed. | |
fea681da MK |
83 | .TP |
84 | .I lower | |
c13182ef MK |
85 | followed by a list of lowercase letters. |
86 | The letters | |
fea681da | 87 | .B a |
b878f418 | 88 | through |
fea681da | 89 | .B z |
c13182ef MK |
90 | are included automatically. |
91 | Characters also specified as | |
fea681da MK |
92 | .BR cntrl , |
93 | .BR digit , | |
94 | .BR punct , | |
95 | or | |
96 | .B space | |
97 | are not allowed. | |
fea681da MK |
98 | .TP |
99 | .I alpha | |
c13182ef MK |
100 | followed by a list of letters. |
101 | All character specified as either | |
fea681da | 102 | .B upper |
c13182ef | 103 | or |
fea681da | 104 | .B lower |
c13182ef MK |
105 | are automatically included. |
106 | Characters also specified as | |
fea681da MK |
107 | .BR cntrl , |
108 | .BR digit , | |
109 | .BR punct , | |
110 | or | |
111 | .B space | |
112 | are not allowed. | |
fea681da MK |
113 | .TP |
114 | .I digit | |
c13182ef MK |
115 | followed by the characters classified as numeric digits. |
116 | Only the | |
117 | digits | |
118 | .B 0 | |
b878f418 | 119 | through |
c13182ef MK |
120 | .B 9 |
121 | are allowed. | |
122 | They are included by default in this class. | |
fea681da MK |
123 | .TP |
124 | .I space | |
125 | followed by a list of characters defined as white-space | |
c13182ef MK |
126 | characters. |
127 | Characters also specified as | |
fea681da MK |
128 | .BR upper , |
129 | .BR lower , | |
130 | .BR alpha , | |
131 | .BR digit , | |
132 | .BR graph , | |
133 | or | |
134 | .B xdigit | |
c13182ef MK |
135 | are not allowed. |
136 | The characters | |
fea681da MK |
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. | |
fea681da MK |
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 | |
c13182ef MK |
161 | followed by a list of punctuation characters. |
162 | Characters also | |
fea681da MK |
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. | |
fea681da MK |
173 | .TP |
174 | .I graph | |
175 | followed by a list of printable characters, not including the | |
176 | .B <space> | |
c13182ef MK |
177 | character. |
178 | The characters defined as | |
fea681da MK |
179 | .BR upper , |
180 | .BR lower , | |
181 | .BR alpha , | |
182 | .BR digit , | |
183 | .BR xdigit , | |
184 | and | |
c13182ef | 185 | .B punct |
fea681da MK |
186 | are automatically included. |
187 | Characters also specified as | |
188 | .B cntrl | |
189 | are not allowed. | |
fea681da MK |
190 | .TP |
191 | .I print | |
192 | followed by a list of printable characters, including the | |
193 | .B <space> | |
c13182ef MK |
194 | character. |
195 | The characters defined as | |
fea681da MK |
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. | |
fea681da MK |
208 | .TP |
209 | .I xdigit | |
210 | followed by a list of characters classified as hexadecimal | |
c13182ef MK |
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 | |
fea681da MK |
215 | characters are included by default: |
216 | .B 0 | |
b878f418 | 217 | through |
fea681da MK |
218 | .BR 9 , |
219 | .B a | |
b878f418 | 220 | through |
fea681da MK |
221 | .BR f , |
222 | .B A | |
b878f418 | 223 | through |
fea681da | 224 | .BR F . |
fea681da MK |
225 | .TP |
226 | .I blank | |
c13182ef | 227 | followed by a list of characters classified as |
fea681da MK |
228 | .BR blank . |
229 | The characters | |
230 | .B <space> | |
c13182ef | 231 | and |
fea681da MK |
232 | .B <tab> |
233 | are automatically included. | |
fea681da MK |
234 | .TP |
235 | .I toupper | |
236 | followed by a list of mappings from lowercase to uppercase | |
c13182ef MK |
237 | letters. |
238 | Each mapping is a pair of a lowercase and an uppercase letter | |
239 | separated with a | |
fea681da | 240 | .B , |
c13182ef MK |
241 | and enclosed in parentheses. |
242 | The members of the list are separated | |
fea681da MK |
243 | with semicolons. |
244 | .TP | |
245 | .I tolower | |
246 | followed by a list of mappings from uppercase to lowercase | |
c13182ef MK |
247 | letters. |
248 | If the keyword tolower is not present, the reverse of the | |
fea681da | 249 | toupper list is used. |
fea681da | 250 | .PP |
c13182ef | 251 | The |
fea681da | 252 | .B LC_CTYPE |
c13182ef | 253 | definition ends with the string |
74d32233 | 254 | .IR "END LC_CYTPE" . |
fea681da | 255 | .SS LC_COLLATE |
c13182ef MK |
256 | The |
257 | .B LC_COLLATE | |
258 | category defines the rules for collating characters. | |
259 | Due to | |
fea681da MK |
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: | |
fea681da MK |
267 | .TP |
268 | .I collating-element | |
fea681da MK |
269 | .TP |
270 | .I collating-symbol | |
fea681da MK |
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 | |
a5e0a0e4 MK |
277 | .BR forward , |
278 | .BR backward , | |
fea681da | 279 | or |
a5e0a0e4 | 280 | .BR position . |
fea681da MK |
281 | The order definition consists of lines that describe the order |
282 | and is terminated with the keyword | |
283 | .TP | |
a5e0a0e4 | 284 | .IR order_end . |
fea681da | 285 | .PP |
c13182ef | 286 | For more details see the sources in |
8478ee02 | 287 | .I /usr/lib/nls/src |
fea681da | 288 | notably the examples |
a5e0a0e4 | 289 | .BR POSIX , |
fea681da | 290 | .B Example |
c13182ef | 291 | and |
fea681da | 292 | .B Example2 |
fea681da | 293 | .PP |
c13182ef | 294 | The |
fea681da | 295 | .B LC_COLLATE |
c13182ef | 296 | definition ends with the string |
74d32233 | 297 | .IR "END LC_COLLATE" . |
fea681da MK |
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: | |
fea681da MK |
304 | .TP |
305 | .I int_curr_symbol | |
c13182ef MK |
306 | followed by the international currency symbol. |
307 | This must be a | |
fea681da MK |
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 | |
c13182ef | 325 | quantities. |
fea681da MK |
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 | |
c13182ef | 337 | formatting with the |
a5e0a0e4 | 338 | .BR int_curr_symbol . |
fea681da MK |
339 | .TP |
340 | .I frac_digits | |
341 | followed by the number of fractional digits that should be used when | |
c13182ef | 342 | formatting with the |
a5e0a0e4 | 343 | .BR currency_symbol . |
fea681da MK |
344 | .TP |
345 | .I p_cs_precedes | |
c13182ef MK |
346 | followed by an integer set to |
347 | .B 1 | |
fea681da MK |
348 | if the |
349 | .I currency_symbol | |
350 | or | |
351 | .I int_curr_symbol | |
6beb1671 | 352 | should precede the formatted monetary quantity or set to |
fea681da MK |
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 | |
c13182ef | 366 | value. |
fea681da | 367 | .TP |
c13182ef | 368 | .B 2 |
fea681da MK |
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 | |
c13182ef | 376 | .B 0 |
fea681da MK |
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 | |
c13182ef | 384 | An integer set to |
fea681da MK |
385 | .B 0 |
386 | if no space separates the | |
387 | .I currency_symbol | |
c13182ef | 388 | or |
fea681da MK |
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 | |
c13182ef | 400 | Parentheses enclose the quantity and the |
fea681da MK |
401 | .I currency_symbol |
402 | or | |
a5e0a0e4 | 403 | .IR int_curr_symbol . |
fea681da MK |
404 | .TP |
405 | .B 1 | |
406 | The sign string precedes the quantity and the | |
407 | .I currency_symbol | |
408 | or the | |
a5e0a0e4 | 409 | .IR int_curr_symbol . |
fea681da MK |
410 | .TP |
411 | .B 2 | |
412 | The sign string succeeds the quantity and the | |
413 | .I currency_symbol | |
414 | or the | |
a5e0a0e4 | 415 | .IR int_curr_symbol . |
fea681da MK |
416 | .TP |
417 | .B 3 | |
418 | The sign string precedes the | |
419 | .I currency_symbol | |
420 | or the | |
a5e0a0e4 | 421 | .IR int_curr_symbol . |
fea681da MK |
422 | .TP |
423 | .B 4 | |
424 | The sign string succeeds the | |
425 | .I currency_symbol | |
426 | or the | |
a5e0a0e4 | 427 | .IR int_curr_symbol . |
fea681da MK |
428 | .RE |
429 | .TP | |
430 | .I n_sign_posn | |
431 | .RS | |
432 | .TP | |
433 | .B 0 | |
c13182ef | 434 | Parentheses enclose the quantity and the |
fea681da MK |
435 | .I currency_symbol |
436 | or | |
a5e0a0e4 | 437 | .IR int_curr_symbol . |
fea681da MK |
438 | .TP |
439 | .B 1 | |
440 | The sign string precedes the quantity and the | |
441 | .I currency_symbol | |
442 | or the | |
a5e0a0e4 | 443 | .IR int_curr_symbol . |
fea681da MK |
444 | .TP |
445 | .B 2 | |
446 | The sign string succeeds the quantity and the | |
447 | .I currency_symbol | |
448 | or the | |
a5e0a0e4 | 449 | .IR int_curr_symbol . |
fea681da MK |
450 | .TP |
451 | .B 3 | |
452 | The sign string precedes the | |
453 | .I currency_symbol | |
454 | or the | |
a5e0a0e4 | 455 | .IR int_curr_symbol . |
fea681da MK |
456 | .TP |
457 | .B 4 | |
458 | The sign string succeeds the | |
459 | .I currency_symbol | |
460 | or the | |
a5e0a0e4 | 461 | .IR int_curr_symbol . |
fea681da MK |
462 | .RE |
463 | .PP | |
c13182ef | 464 | The |
fea681da | 465 | .B LC_MONETARY |
c13182ef | 466 | definition ends with the string |
74d32233 | 467 | .IR "END LC_MONETARY" . |
fea681da MK |
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: | |
fea681da MK |
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 | |
c13182ef | 485 | quantities. |
fea681da | 486 | .PP |
c13182ef | 487 | The |
fea681da | 488 | .B LC_NUMERIC |
c13182ef | 489 | definition ends with the string |
74d32233 | 490 | .IR "END LC_NUMERIC" . |
fea681da MK |
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: | |
fea681da MK |
497 | .TP |
498 | .I abday | |
b458e1bf | 499 | followed by a list of abbreviated names of the days of the week. |
33af8501 MK |
500 | The list starts with the first day of the week |
501 | as specified by | |
502 | .I week | |
503 | (Sunday by default). | |
fea681da MK |
504 | .TP |
505 | .I day | |
b458e1bf | 506 | followed by a list of names of the days of the week. |
33af8501 MK |
507 | The list starts with the first day of the week |
508 | as specified by | |
509 | .I week | |
510 | (Sunday by default). | |
fea681da MK |
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 | |
c13182ef | 521 | and |
fea681da MK |
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. | |
33af8501 MK |
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 | |
67da5267 MK |
546 | shall be used for Monday. |
547 | Thus, countries using | |
33af8501 MK |
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 | |
1bb54c6c | 554 | should have Monday translation as the first item in the |
33af8501 MK |
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. | |
fea681da | 573 | .PP |
c13182ef | 574 | The |
fea681da | 575 | .B LC_TIME |
c13182ef | 576 | definition ends with the string |
74d32233 | 577 | .IR "END LC_TIME" . |
fea681da MK |
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: | |
fea681da MK |
584 | .TP |
585 | .I yesexpr | |
586 | followed by a regular expression that describes possible | |
c13182ef | 587 | yes-responses. |
fea681da MK |
588 | .TP |
589 | .I noexpr | |
590 | followed by a regular expression that describes possible | |
c13182ef | 591 | no-responses. |
fea681da | 592 | .PP |
c13182ef | 593 | The |
fea681da | 594 | .B LC_MESSAGES |
c13182ef | 595 | definition ends with the string |
74d32233 | 596 | .IR "END LC_MESSAGES" . |
fea681da MK |
597 | |
598 | See the POSIX.2 standard for details. | |
599 | .SH FILES | |
600 | /usr/lib/locale/ | |
df8a3cac | 601 | \(em database for the current locale setting of that category |
fea681da | 602 | .br |
df8a3cac | 603 | /usr/lib/nls/charmap/* \(em charmap-files |
47297adb | 604 | .SH CONFORMING TO |
44a2c328 | 605 | POSIX.2, ISO/IEC 14652. |
fea681da | 606 | .SH BUGS |
23618627 | 607 | This manual page isn't complete. |
fea681da MK |
608 | .\" .SH AUTHOR |
609 | .\" Jochen Hein (Hein@Student.TU-Clausthal.de) | |
47297adb | 610 | .SH SEE ALSO |
fea681da MK |
611 | .BR locale (1), |
612 | .BR localedef (1), | |
613 | .BR localeconv (3), | |
614 | .BR setlocale (3), | |
615 | .BR charmap (5) |