]>
Commit | Line | Data |
---|---|---|
869f1c65 MM |
1 | .\" Copyright (C) 2001 Richard Braakman |
2 | .\" Copyright (C) 2004 Alastair McKinstry | |
3 | .\" Copyright (C) 2005 Lars Wirzenius | |
4 | .\" Copyright (C) 2014 Marko Myllynen | |
f2efbf2f | 5 | .\" |
e4a74ca8 | 6 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
869f1c65 MM |
7 | .\" |
8 | .\" This manual page was initially written by Richard Braakman | |
9 | .\" on behalf of the Debian GNU/Linux Project and anyone else | |
f2efbf2f | 10 | .\" who wants it. It was amended by Alastair McKinstry to |
5abb7568 | 11 | .\" explain new ISO/IEC 14652 elements, and amended further by |
869f1c65 MM |
12 | .\" Lars Wirzenius to document new functionality (as of GNU |
13 | .\" C library 2.3.5). | |
14 | .\" | |
4c1c5274 | 15 | .TH localedef 1 (date) "Linux man-pages (unreleased)" |
869f1c65 MM |
16 | .SH NAME |
17 | localedef \- compile locale definition files | |
18 | .SH SYNOPSIS | |
b48b3b03 | 19 | .SY localedef |
869f1c65 MM |
20 | .RI [ options ] |
21 | .I outputpath | |
b48b3b03 BR |
22 | .YS |
23 | .SY localedef | |
24 | .B \-\-add\-to\-archive | |
869f1c65 | 25 | .RI [ options ] |
c27b4907 | 26 | .I compiledpath |
b48b3b03 BR |
27 | .YS |
28 | .SY localedef | |
29 | .B \-\-delete\-from\-archive | |
869f1c65 MM |
30 | .RI [ options ] |
31 | .IR localename " ..." | |
b48b3b03 BR |
32 | .YS |
33 | .SY localedef | |
34 | .B \-\-list\-archive | |
869f1c65 | 35 | .RI [ options ] |
b48b3b03 BR |
36 | .YS |
37 | .SY localedef | |
38 | .B \-\-help | |
39 | .YS | |
40 | .SY localedef | |
41 | .B \-\-usage | |
42 | .YS | |
43 | .SY localedef | |
44 | .B \-\-version | |
45 | .YS | |
869f1c65 MM |
46 | .SH DESCRIPTION |
47 | The | |
48 | .B localedef | |
49 | program reads the indicated | |
50 | .I charmap | |
51 | and | |
52 | .I input | |
95df812b BR |
53 | files, |
54 | compiles them to a binary form quickly usable by the | |
74183758 MK |
55 | locale functions in the C library |
56 | .RB ( setlocale (3), | |
57 | .BR localeconv (3), | |
95df812b BR |
58 | etc.), |
59 | and places the output in | |
869f1c65 | 60 | .IR outputpath . |
2a86152e | 61 | .PP |
3e4895ed MK |
62 | The |
63 | .I outputpath | |
64 | argument is interpreted as follows: | |
cdede5cd | 65 | .IP \[bu] 3 |
869f1c65 MM |
66 | If |
67 | .I outputpath | |
95df812b BR |
68 | contains a slash character ('/'), |
69 | it is interpreted as the name of the | |
56b0fba4 | 70 | directory where the output definitions are to be stored. |
95df812b BR |
71 | In this case, |
72 | there is a separate output file for each locale category | |
2a9e359e | 73 | .RI ( LC_TIME , |
3e4895ed MK |
74 | .IR LC_NUMERIC , |
75 | and so on). | |
cdede5cd | 76 | .IP \[bu] |
f2efbf2f | 77 | If the |
869f1c65 MM |
78 | .B \-\-no\-archive |
79 | option is used, | |
80 | .I outputpath | |
81 | is the name of a subdirectory in | |
3e4895ed | 82 | .I /usr/lib/locale |
869f1c65 | 83 | where per-category compiled files are placed. |
cdede5cd | 84 | .IP \[bu] |
f2efbf2f | 85 | Otherwise, |
869f1c65 MM |
86 | .I outputpath |
87 | is the name of a locale and the compiled locale data is added to the | |
f2efbf2f | 88 | archive file |
b49c2acb | 89 | .IR /usr/lib/locale/locale\-archive . |
3e4895ed MK |
90 | A locale archive is a memory-mapped file which contains all the |
91 | system-provided locales; | |
92 | it is used by all localized programs when the environment variable | |
869f1c65 MM |
93 | .B LOCPATH |
94 | is not set. | |
95 | .PP | |
96 | In any case, | |
97 | .B localedef | |
98 | aborts if the directory in which it tries to write locale files has | |
99 | not already been created. | |
100 | .PP | |
101 | If no | |
102 | .I charmapfile | |
95df812b BR |
103 | is given, |
104 | the value | |
cd415e73 | 105 | .I ANSI_X3.4\-1968 |
869f1c65 MM |
106 | (for ASCII) is used by default. |
107 | If no | |
108 | .I inputfile | |
95df812b BR |
109 | is given, |
110 | or if it is given as a dash | |
3e4895ed | 111 | (\-), |
869f1c65 MM |
112 | .B localedef |
113 | reads from standard input. | |
114 | .SH OPTIONS | |
3e4895ed | 115 | .SS Operation-selection options |
f2efbf2f | 116 | A few options direct |
869f1c65 | 117 | .B localedef |
3e4895ed MK |
118 | to do something other than compile locale definitions. |
119 | Only one of these options should be used at a time. | |
869f1c65 | 120 | .TP |
869f1c65 | 121 | .B \-\-add\-to\-archive |
f2efbf2f | 122 | Add the |
869f1c65 MM |
123 | .I compiledpath |
124 | directories to the locale archive file. | |
f2efbf2f | 125 | The directories should have been created by previous runs of |
869f1c65 | 126 | .BR localedef , |
f2efbf2f | 127 | using |
869f1c65 | 128 | .BR \-\-no\-archive . |
c27b4907 MM |
129 | .TP |
130 | .B \-\-delete\-from\-archive | |
131 | Delete the named locales from the locale archive file. | |
132 | .TP | |
133 | .B \-\-list\-archive | |
134 | List the locales contained in the locale archive file. | |
3e4895ed | 135 | .SS Other options |
2941a9b7 | 136 | Some of the following options are sensible only for certain operations; |
95df812b BR |
137 | generally, |
138 | it should be self-evident which ones. | |
8d150d79 MK |
139 | Notice that |
140 | .B \-f | |
141 | and | |
142 | .B \-c | |
95df812b BR |
143 | are reversed from what you might expect; |
144 | that is, | |
8d150d79 MK |
145 | .B \-f |
146 | is not the same as | |
147 | .BR \-\-force . | |
869f1c65 | 148 | .TP |
53f2ec07 | 149 | .BI \-f " charmapfile" "\fR, \fP\-\-charmap=" charmapfile |
03ba14f9 MM |
150 | Specify the file that defines the character set |
151 | that is used by the input file. | |
869f1c65 MM |
152 | If |
153 | .I charmapfile | |
154 | contains a slash character ('/'), | |
3e4895ed | 155 | it is interpreted as the name of the character map. |
95df812b BR |
156 | Otherwise, |
157 | the file is sought in the current directory | |
869f1c65 MM |
158 | and the default directory for character maps. |
159 | If the environment variable | |
160 | .B I18NPATH | |
f2efbf2f | 161 | is set, |
3e4895ed | 162 | .I $I18NPATH/charmaps/ |
869f1c65 | 163 | and |
3e4895ed | 164 | .I $I18NPATH/ |
869f1c65 MM |
165 | are also searched after the current directory. |
166 | The default directory for character maps is printed by | |
167 | .BR "localedef \-\-help" . | |
168 | .TP | |
53f2ec07 | 169 | .BI \-i " inputfile" "\fR, \fP\-\-inputfile=" inputfile |
869f1c65 | 170 | Specify the locale definition file to compile. |
3e4895ed | 171 | The file is sought in the current directory |
869f1c65 MM |
172 | and the default directory for locale definition files. |
173 | If the environment variable | |
174 | .B I18NPATH | |
f2efbf2f | 175 | is set, |
3e4895ed | 176 | .I $I18NPATH/locales/ |
869f1c65 | 177 | and |
3e4895ed | 178 | .I $I18NPATH |
869f1c65 MM |
179 | are also searched after the current directory. |
180 | The default directory for locale definition files is printed by | |
181 | .BR "localedef \-\-help" . | |
182 | .TP | |
28a4c58c | 183 | .BI \-u " repertoirefile" "\fR, \fP\-\-repertoire\-map=" repertoirefile |
03ba14f9 | 184 | Read mappings from symbolic names to Unicode code points from |
869f1c65 MM |
185 | .IR repertoirefile . |
186 | If | |
187 | .I repertoirefile | |
188 | contains a slash character ('/'), | |
3e4895ed | 189 | it is interpreted as the pathname of the repertoire map. |
95df812b BR |
190 | Otherwise, |
191 | the file is sought in the current directory | |
869f1c65 MM |
192 | and the default directory for repertoire maps. |
193 | If the environment variable | |
194 | .B I18NPATH | |
f2efbf2f | 195 | is set, |
3e4895ed | 196 | .I $I18NPATH/repertoiremaps/ |
869f1c65 | 197 | and |
3e4895ed | 198 | .I $I18NPATH |
869f1c65 MM |
199 | are also searched after the current directory. |
200 | The default directory for repertoire maps is printed by | |
201 | .BR "localedef \-\-help" . | |
202 | .TP | |
53f2ec07 | 203 | .BI \-A " aliasfile" "\fR, \fP\-\-alias\-file=" aliasfile |
f2efbf2f | 204 | Use |
869f1c65 MM |
205 | .I aliasfile |
206 | to look up aliases for locale names. | |
207 | There is no default aliases file. | |
208 | .TP | |
6fdb1c03 | 209 | .B \-\-force |
5a3a191d AC |
210 | .TQ |
211 | .B \-c | |
869f1c65 MM |
212 | Write the output files even if warnings were generated about the input |
213 | file. | |
214 | .TP | |
6fdb1c03 | 215 | .B \-\-verbose |
5a3a191d AC |
216 | .TQ |
217 | .B \-v | |
869f1c65 MM |
218 | Generate extra warnings about errors that are normally ignored. |
219 | .TP | |
c27b4907 | 220 | .B \-\-big\-endian |
9226b361 | 221 | Generate big-endian output. |
c27b4907 MM |
222 | .TP |
223 | .B \-\-little\-endian | |
9226b361 | 224 | Generate little-endian output. |
c27b4907 MM |
225 | .TP |
226 | .B \-\-no\-archive | |
95df812b BR |
227 | Do not use the locale archive file, |
228 | instead create | |
c27b4907 MM |
229 | .I outputpath |
230 | as a subdirectory in the same directory as the locale archive file, | |
231 | and create separate output files for locale categories in it. | |
232 | This is helpful to prevent system locale archive updates from overwriting | |
233 | custom locales created with | |
234 | .BR localedef . | |
235 | .TP | |
236 | .B \-\-no\-hard\-links | |
237 | Do not create hard links between installed locales. | |
238 | .TP | |
239 | .BI \-\-no\-warnings= warnings | |
240 | Comma-separated list of warnings to disable. | |
241 | Supported warnings are | |
242 | .I ascii | |
243 | and | |
244 | .IR intcurrsym . | |
869f1c65 MM |
245 | .TP |
246 | .B \-\-posix | |
5e833e27 MK |
247 | Conform strictly to POSIX. |
248 | Implies | |
869f1c65 MM |
249 | .BR \-\-verbose . |
250 | This option currently has no other effect. | |
251 | POSIX conformance is assumed if the environment variable | |
252 | .B POSIXLY_CORRECT | |
253 | is set. | |
254 | .TP | |
c27b4907 MM |
255 | .BI \-\-prefix= pathname |
256 | Set the prefix to be prepended to the full archive pathname. | |
95df812b BR |
257 | By default, |
258 | the prefix is empty. | |
c27b4907 MM |
259 | Setting the prefix to |
260 | .IR foo , | |
261 | the archive would be placed in | |
b49c2acb | 262 | .IR foo/usr/lib/locale/locale\-archive . |
c27b4907 MM |
263 | .TP |
264 | .B \-\-quiet | |
95df812b BR |
265 | Suppress all notifications and warnings, |
266 | and report only fatal errors. | |
c27b4907 | 267 | .TP |
869f1c65 MM |
268 | .B \-\-replace |
269 | Replace a locale in the locale archive file. | |
95df812b BR |
270 | Without this option, |
271 | if the locale is in the archive file already, | |
869f1c65 MM |
272 | an error occurs. |
273 | .TP | |
c27b4907 MM |
274 | .BI \-\-warnings= warnings |
275 | Comma-separated list of warnings to enable. | |
276 | Supported warnings are | |
277 | .I ascii | |
278 | and | |
279 | .IR intcurrsym . | |
869f1c65 | 280 | .TP |
6fdb1c03 | 281 | .B \-\-help |
5a3a191d AC |
282 | .TQ |
283 | .B \-? | |
869f1c65 MM |
284 | Print a usage summary and exit. |
285 | Also prints the default paths used by | |
286 | .BR localedef . | |
287 | .TP | |
6fdb1c03 | 288 | .B \-\-usage |
869f1c65 MM |
289 | Print a short usage summary and exit. |
290 | .TP | |
6fdb1c03 | 291 | .B \-\-version |
5a3a191d AC |
292 | .TQ |
293 | .B \-V | |
95df812b BR |
294 | Print the version number, |
295 | license, | |
296 | and disclaimer of warranty for | |
869f1c65 MM |
297 | .BR localedef . |
298 | .SH EXIT STATUS | |
299 | One of the following exit values can be returned by | |
300 | .BR localedef : | |
0019177e | 301 | .TP |
869f1c65 MM |
302 | .B 0 |
303 | Command completed successfully. | |
304 | .TP | |
305 | .B 1 | |
95df812b BR |
306 | Warnings or errors occurred, |
307 | output files were written. | |
869f1c65 MM |
308 | .TP |
309 | .B 4 | |
95df812b BR |
310 | Errors encountered, |
311 | no output created. | |
869f1c65 MM |
312 | .SH ENVIRONMENT |
313 | .TP | |
314 | .B POSIXLY_CORRECT | |
315 | The | |
316 | .B \-\-posix | |
317 | flag is assumed if this environment variable is set. | |
318 | .TP | |
319 | .B I18NPATH | |
320 | A colon-separated list of search directories for files. | |
321 | .SH FILES | |
322 | .TP | |
323 | .I /usr/share/i18n/charmaps | |
324 | Usual default character map path. | |
325 | .TP | |
326 | .I /usr/share/i18n/locales | |
327 | Usual default path for locale definition files. | |
328 | .TP | |
329 | .I /usr/share/i18n/repertoiremaps | |
330 | Usual default repertoire map path. | |
331 | .TP | |
b49c2acb | 332 | .I /usr/lib/locale/locale\-archive |
869f1c65 | 333 | Usual default locale archive location. |
360d3116 MK |
334 | .TP |
335 | .I /usr/lib/locale | |
3d49eaad | 336 | Usual default path for compiled individual locale data files. |
869f1c65 MM |
337 | .TP |
338 | .I outputpath/LC_ADDRESS | |
f156df7b | 339 | An output file that contains information about formatting of |
869f1c65 MM |
340 | addresses and geography-related items. |
341 | .TP | |
342 | .I outputpath/LC_COLLATE | |
f2efbf2f | 343 | An output file that contains information about the rules for comparing |
869f1c65 MM |
344 | strings. |
345 | .TP | |
346 | .I outputpath/LC_CTYPE | |
347 | An output file that contains information about character classes. | |
348 | .TP | |
349 | .I outputpath/LC_IDENTIFICATION | |
350 | An output file that contains metadata about the locale. | |
351 | .TP | |
352 | .I outputpath/LC_MEASUREMENT | |
f2efbf2f | 353 | An output file that contains information about locale measurements |
869f1c65 MM |
354 | (metric versus US customary). |
355 | .TP | |
356 | .I outputpath/LC_MESSAGES/SYS_LC_MESSAGES | |
f2efbf2f | 357 | An output file that contains information about the language messages |
95df812b BR |
358 | should be printed in, |
359 | and what an affirmative or negative answer looks like. | |
869f1c65 MM |
360 | .TP |
361 | .I outputpath/LC_MONETARY | |
f2efbf2f | 362 | An output file that contains information about formatting of monetary |
869f1c65 MM |
363 | values. |
364 | .TP | |
365 | .I outputpath/LC_NAME | |
366 | An output file that contains information about salutations for persons. | |
367 | .TP | |
368 | .I outputpath/LC_NUMERIC | |
f2efbf2f | 369 | An output file that contains information about formatting of nonmonetary |
869f1c65 MM |
370 | numeric values. |
371 | .TP | |
372 | .I outputpath/LC_PAPER | |
f2efbf2f | 373 | An output file that contains information about settings related to |
869f1c65 MM |
374 | standard paper size. |
375 | .TP | |
376 | .I outputpath/LC_TELEPHONE | |
f2efbf2f | 377 | An output file that contains information about formats to be used with |
869f1c65 MM |
378 | telephone services. |
379 | .TP | |
380 | .I outputpath/LC_TIME | |
f2efbf2f | 381 | An output file that contains information about formatting of data and |
869f1c65 | 382 | time values. |
3113c7f3 | 383 | .SH STANDARDS |
869f1c65 | 384 | POSIX.1-2008. |
a14af333 | 385 | .SH EXAMPLES |
869f1c65 | 386 | Compile the locale files for Finnish in the UTF\-8 character set |
f2efbf2f | 387 | and add it to the default locale archive with the name |
869f1c65 MM |
388 | .BR fi_FI.UTF\-8 : |
389 | .PP | |
a81c452b MK |
390 | .in +4n |
391 | .EX | |
869f1c65 | 392 | localedef \-f UTF\-8 \-i fi_FI fi_FI.UTF\-8 |
a81c452b MK |
393 | .EE |
394 | .in | |
869f1c65 | 395 | .PP |
95df812b BR |
396 | The next example does the same thing, |
397 | but generates files into the | |
3e4895ed | 398 | .I fi_FI.UTF\-8 |
869f1c65 MM |
399 | directory which can then be used by programs when the environment |
400 | variable | |
401 | .B LOCPATH | |
f2efbf2f | 402 | is set to the current directory (note that the last argument must |
869f1c65 MM |
403 | contain a slash): |
404 | .PP | |
a81c452b MK |
405 | .in +4n |
406 | .EX | |
869f1c65 | 407 | localedef \-f UTF\-8 \-i fi_FI ./fi_FI.UTF\-8 |
a81c452b MK |
408 | .EE |
409 | .in | |
d282bb24 | 410 | .SH SEE ALSO |
869f1c65 | 411 | .BR locale (1), |
03ba14f9 | 412 | .BR charmap (5), |
869f1c65 | 413 | .BR locale (5), |
03ba14f9 | 414 | .BR repertoiremap (5), |
869f1c65 | 415 | .BR locale (7) |