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