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