1LOCALE(5)                      Linux User Manual                     LOCALE(5)
2
3
4

NAME

6       locale - Describes a locale definition file
7

DESCRIPTION

9       The  locale  definition  files  contains  all  the information that the
10       localedef(1) command needs to convert it into the binary  locale  data‐
11       base.
12
13       The  definition  files consist of sections which each describe a locale
14       category in detail.
15
16   Syntax
17       The locale definition file starts with a header that may consist of the
18       following keywords:
19
20       <escape_char>
21              is  followed  by  a character that should be used as the escape-
22              character for the rest of  the  file  to  mark  characters  that
23              should  be  interpreted  in  a  special way.  It defaults to the
24              backslash (\).
25
26       <comment_char>
27              is followed by a character that will be  used  as  the  comment-
28              character  for  the rest of the file.  It defaults to the number
29              sign (#).
30
31       The locale definition has one part for each locale category.  Each part
32       can  be  copied  from  another  existing  locale or can be defined from
33       scratch.  If the category should be copied, the only valid  keyword  in
34       the  definition is copy followed by the name of the locale which should
35       be copied.
36
37   LC_CTYPE
38       The definition  for  the  LC_CTYPE  category  starts  with  the  string
39       LC_CTYPE in the first column.
40
41       There are the following keywords allowed:
42
43       upper  followed  by a list of uppercase letters.  The letters A through
44              Z are included  automatically.   Characters  also  specified  as
45              cntrl, digit, punct, or space are not allowed.
46
47       lower  followed  by a list of lowercase letters.  The letters a through
48              z are included  automatically.   Characters  also  specified  as
49              cntrl, digit, punct, or space are not allowed.
50
51       alpha  followed  by  a  list  of  letters.   All character specified as
52              either upper or lower are  automatically  included.   Characters
53              also specified as cntrl, digit, punct, or space are not allowed.
54
55       digit  followed  by  the characters classified as numeric digits.  Only
56              the digits 0 through  9  are  allowed.   They  are  included  by
57              default in this class.
58
59       space  followed  by a list of characters defined as white-space charac‐
60              ters.  Characters also specified as upper, lower, alpha,  digit,
61              graph,  or  xdigit  are  not  allowed.   The characters <space>,
62              <form-feed>, <newline>, <carriage-return>, <tab>, and <vertical-
63              tab> are automatically included.
64
65       cntrl  followed by a list of control characters.  Characters also spec‐
66              ified as upper, lower, alpha, digit,  punct,  graph,  print,  or
67              xdigit are not allowed.
68
69       punct  followed  by  a list of punctuation characters.  Characters also
70              specified as upper, lower, alpha, digit, cntrl, xdigit,  or  the
71              <space> character are not allowed.
72
73       graph  followed  by  a  list of printable characters, not including the
74              <space> character.  The  characters  defined  as  upper,  lower,
75              alpha,  digit,  xdigit,  and  punct  are automatically included.
76              Characters also specified as cntrl are not allowed.
77
78       print  followed by  a  list  of  printable  characters,  including  the
79              <space>  character.   The  characters  defined  as upper, lower,
80              alpha, digit, xdigit, punct, and the <space> character are auto‐
81              matically  included.  Characters also specified as cntrl are not
82              allowed.
83
84       xdigit followed by a list of characters classified as hexadecimal  dig‐
85              its.   The  decimal  digits  must be included followed by one or
86              more set of six characters in ascending  order.   The  following
87              characters  are included by default: 0 through 9, a through f, A
88              through F.
89
90       blank  followed by a list of characters classified as blank.  The char‐
91              acters <space> and <tab> are automatically included.
92
93       toupper
94              followed  by a list of mappings from lowercase to uppercase let‐
95              ters.  Each mapping is a pair of a lowercase  and  an  uppercase
96              letter separated with a , and enclosed in parentheses.  The mem‐
97              bers of the list are separated with semicolons.
98
99       tolower
100              followed by a list of mappings from uppercase to lowercase  let‐
101              ters.  If the keyword tolower is not present, the reverse of the
102              toupper list is used.
103
104       The LC_CTYPE definition ends with the string END LC_CYTPE.
105
106   LC_COLLATE
107       The LC_COLLATE category defines the  rules  for  collating  characters.
108       Due to limitations of libc not all POSIX-options are implemented.
109
110       The definition starts with the string LC_COLLATE in the first column.
111
112       There are the following keywords allowed:
113
114       collating-element
115
116       collating-symbol
117
118       The order-definition starts with a line:
119
120       order_start
121
122       followed  by  a list of keywords out of forward, backward, or position.
123       The order definition consists of lines that describe the order  and  is
124       terminated with the keyword
125
126       order_end.
127
128       For  more details see the sources in /usr/lib/nls/src notably the exam‐
129       ples POSIX, Example and Example2
130
131       The LC_COLLATE definition ends with the string END LC_COLLATE.
132
133   LC_MONETARY
134       The definition starts with the string LC_MONETARY in the first column.
135
136       There are the following keywords allowed:
137
138       int_curr_symbol
139              followed by the international currency symbol.  This must  be  a
140              4-character  string containing the international currency symbol
141              as defined by the ISO 4217 standard (three characters)  followed
142              by a separator.
143
144       currency_symbol
145              followed by the local currency symbol.
146
147       mon_decimal_point
148              followed  by  the string that will be used as the decimal delim‐
149              iter when formatting monetary quantities.
150
151       mon_thousands_sep
152              followed by the string that will be used as  a  group  separator
153              when formatting monetary quantities.
154
155       mon_grouping
156              followed  by  a  string that describes the formatting of numeric
157              quantities.
158
159       positive_sign
160              followed by a string that is used to indicate  a  positive  sign
161              for monetary quantities.
162
163       negative_sign
164              followed  by  a  string that is used to indicate a negative sign
165              for monetary quantities.
166
167       int_frac_digits
168              followed by the number of fractional digits that should be  used
169              when formatting with the int_curr_symbol.
170
171       frac_digits
172              followed  by the number of fractional digits that should be used
173              when formatting with the currency_symbol.
174
175       p_cs_precedes
176              followed by an integer  set  to  1  if  the  currency_symbol  or
177              int_curr_symbol  should  precede the formatted monetary quantity
178              or set to 0 if the symbol succeeds the value.
179
180       p_sep_by_space
181              followed by an integer.
182
183              0      means that no space should be printed between the  symbol
184                     and the value.
185
186              1      means  that  a space should be printed between the symbol
187                     and the value.
188
189              2      means that a space should be printed between  the  symbol
190                     and the sign string, if adjacent.
191
192       n_cs_precedes
193
194              0      - the symbol succeeds the value.
195
196              1      - the symbol precedes the value.
197
198       n_sep_by_space
199              An integer set to 0 if no space separates the currency_symbol or
200              int_curr_symbol from the value for a negative monetary quantity,
201              set  to 1 if a space separates the symbol from the value and set
202              to 2 if a space separates the symbol and  the  sign  string,  if
203              adjacent.
204
205       p_sign_posn
206
207              0      Parentheses  enclose the quantity and the currency_symbol
208                     or int_curr_symbol.
209
210              1      The sign  string  precedes  the  quantity  and  the  cur‐
211                     rency_symbol or the int_curr_symbol.
212
213              2      The  sign  string  succeeds  the  quantity  and  the cur‐
214                     rency_symbol or the int_curr_symbol.
215
216              3      The sign  string  precedes  the  currency_symbol  or  the
217                     int_curr_symbol.
218
219              4      The  sign  string  succeeds  the  currency_symbol  or the
220                     int_curr_symbol.
221
222       n_sign_posn
223
224              0      Parentheses enclose the quantity and the  currency_symbol
225                     or int_curr_symbol.
226
227              1      The  sign  string  precedes  the  quantity  and  the cur‐
228                     rency_symbol or the int_curr_symbol.
229
230              2      The sign  string  succeeds  the  quantity  and  the  cur‐
231                     rency_symbol or the int_curr_symbol.
232
233              3      The  sign  string  precedes  the  currency_symbol  or the
234                     int_curr_symbol.
235
236              4      The sign  string  succeeds  the  currency_symbol  or  the
237                     int_curr_symbol.
238
239       The LC_MONETARY definition ends with the string END LC_MONETARY.
240
241   LC_NUMERIC
242       The definition starts with the string LC_NUMERIC in the first column.
243
244       The following keywords are allowed:
245
246       decimal_point
247              followed  by  the string that will be used as the decimal delim‐
248              iter when formatting numeric quantities.
249
250       thousands_sep
251              followed by the string that will be used as  a  group  separator
252              when formatting numeric quantities.
253
254       grouping
255              followed  by  a  string that describes the formatting of numeric
256              quantities.
257
258       The LC_NUMERIC definition ends with the string END LC_NUMERIC.
259
260   LC_TIME
261       The definition starts with the string LC_TIME in the first column.
262
263       The following keywords are allowed:
264
265       abday  followed by a list  of  abbreviated  weekday  names.   The  list
266              starts with the first day of the week as specified by week (Sun‐
267              day by default).
268
269       day    followed by a list of weekday names.  The list starts  with  the
270              first day of the week as specified by week (Sunday by default).
271
272       abmon  followed by a list of abbreviated month names.
273
274       mon    followed by a list of month names.
275
276       am_pm  The appropriate representation of the am and pm strings.
277
278       d_t_fmt
279              The appropriate date and time format.
280
281       d_fmt  The appropriate date format.
282
283       t_fmt  The appropriate time format.
284
285       t_fmt_ampm
286              The appropriate time format when using 12h clock format.
287
288       week   followed by a list of three values: The number of days in a week
289              (by default 7), a date of beginning of the week (by default cor‐
290              responds to Sunday), and the minimal length of the first week in
291              year (by default 4).  Regarding the start of the week,  19971130
292              shall  be used for Sunday and 19971201 shall be used for Monday.
293              Thus, countries using 19971130 should have local Sunday name  as
294              the  first  day  in the day list, while countries using 19971201
295              should have Monday translation as the  first  item  in  the  day
296              list.
297
298       first_weekday (since glibc 2.2)
299              Number  of the first day from the day list to be shown in calen‐
300              dar applications.  The default value of 1 corresponds to  either
301              Sunday  or Monday depending on the value of the second week list
302              item.
303
304       first_workday (since glibc 2.2)
305              Number of the first working day from the day list.
306
307       The LC_TIME definition ends with the string END LC_TIME.
308
309   LC_MESSAGES
310       The definition starts with the string LC_MESSAGES in the first column.
311
312       The following keywords are allowed:
313
314       yesexpr
315              followed by a regular expression that  describes  possible  yes-
316              responses.
317
318       noexpr followed  by  a  regular  expression that describes possible no-
319              responses.
320
321       The LC_MESSAGES definition ends with the string END LC_MESSAGES.
322
323       See the POSIX.2 standard for details.
324

FILES

326       /usr/lib/locale/ — database for the current locale setting of that cat‐
327       egory
328       /usr/lib/nls/charmap/* — charmap-files
329

CONFORMING TO

331       POSIX.2, ISO/IEC 14652.
332

BUGS

334       This manual page isn't complete.
335

SEE ALSO

337       locale(1), localedef(1), localeconv(3), setlocale(3), charmap(5)
338

COLOPHON

340       This  page  is  part of release 3.22 of the Linux man-pages project.  A
341       description of the project, and information about reporting  bugs,  can
342       be found at http://www.kernel.org/doc/man-pages/.
343
344
345
346Linux                             2008-06-17                         LOCALE(5)
Impressum