1 .\" Copyright (C) 2001 Richard Braakman
2 .\" Copyright (C) 2004 Alastair McKinstry
3 .\" Copyright (C) 2005 Lars Wirzenius
4 .\" Copyright (C) 2014 Marko Myllynen
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.
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.
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.
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/>.
27 .\" This manual page was initially written by Richard Braakman
28 .\" on behalf of the Debian GNU/Linux Project and anyone else
29 .\" who wants it. It was amended by Alastair McKinstry to
30 .\" explain new ISO 14652 elements, and amended further by
31 .\" Lars Wirzenius to document new functionality (as of GNU
34 .TH LOCALEDEF 1 2020-04-11 "Linux" "Linux User Manual"
36 localedef \- compile locale definition files
44 .B "localedef \-\-add\-to\-archive"
48 .B "localedef \-\-delete\-from\-archive"
52 .B "localedef \-\-list\-archive"
55 .B "localedef \-\-help"
57 .B "localedef \-\-usage"
59 .B "localedef \-\-version"
65 program reads the indicated
69 files, compiles them to a binary form quickly usable by the
70 locale functions in the C library
73 etc.), and places the output in
78 argument is interpreted as follows:
82 contains a slash character ('/'), it is interpreted as the name of the
83 directory where the output definitions are to be stored.
84 In this case, there is a separate output file for each locale category
93 is the name of a subdirectory in
95 where per-category compiled files are placed.
99 is the name of a locale and the compiled locale data is added to the
101 .IR /usr/lib/locale/locale-archive .
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
110 aborts if the directory in which it tries to write locale files has
111 not already been created.
117 (for ASCII) is used by default.
120 is given, or if it is given as a dash
123 reads from standard input.
125 .SS Operation-selection options
128 to do something other than compile locale definitions.
129 Only one of these options should be used at a time.
131 .B \-\-add\-to\-archive
134 directories to the locale archive file.
135 The directories should have been created by previous runs of
138 .BR \-\-no\-archive .
140 .B \-\-delete\-from\-archive
141 Delete the named locales from the locale archive file.
144 List the locales contained in the locale archive file.
146 Some of the following options are sensible only for certain operations;
147 generally, it should be self-evident which ones.
152 are reversed from what you might expect; that is,
157 .BI \-f " charmapfile" "\fR, \fP\-\-charmap=" charmapfile
158 Specify the file that defines the character set
159 that is used by the input file.
162 contains a slash character ('/'),
163 it is interpreted as the name of the character map.
164 Otherwise, the file is sought in the current directory
165 and the default directory for character maps.
166 If the environment variable
169 .I $I18NPATH/charmaps/
172 are also searched after the current directory.
173 The default directory for character maps is printed by
174 .BR "localedef \-\-help" .
176 .BI \-i " inputfile" "\fR, \fP\-\-inputfile=" inputfile
177 Specify the locale definition file to compile.
178 The file is sought in the current directory
179 and the default directory for locale definition files.
180 If the environment variable
183 .I $I18NPATH/locales/
186 are also searched after the current directory.
187 The default directory for locale definition files is printed by
188 .BR "localedef \-\-help" .
190 .BI \-u " repertoirefile" "\fR, \fP\-\-repertoire\-map=" repertoirefile
191 Read mappings from symbolic names to Unicode code points from
195 contains a slash character ('/'),
196 it is interpreted as the pathname of the repertoire map.
197 Otherwise, the file is sought in the current directory
198 and the default directory for repertoire maps.
199 If the environment variable
202 .I $I18NPATH/repertoiremaps/
205 are also searched after the current directory.
206 The default directory for repertoire maps is printed by
207 .BR "localedef \-\-help" .
209 .BI \-A " aliasfile" "\fR, \fP\-\-alias\-file=" aliasfile
212 to look up aliases for locale names.
213 There is no default aliases file.
215 .BR \-c ", " \-\-force
216 Write the output files even if warnings were generated about the input
219 .BR \-v ", " \-\-verbose
220 Generate extra warnings about errors that are normally ignored.
223 Generate big-endian output.
225 .B \-\-little\-endian
226 Generate little-endian output.
229 Do not use the locale archive file, instead create
231 as a subdirectory in the same directory as the locale archive file,
232 and create separate output files for locale categories in it.
233 This is helpful to prevent system locale archive updates from overwriting
234 custom locales created with
237 .B \-\-no\-hard\-links
238 Do not create hard links between installed locales.
240 .BI \-\-no\-warnings= warnings
241 Comma-separated list of warnings to disable.
242 Supported warnings are
248 Conform strictly to POSIX. Implies
250 This option currently has no other effect.
251 POSIX conformance is assumed if the environment variable
255 .BI \-\-prefix= pathname
256 Set the prefix to be prepended to the full archive pathname.
257 By default, the prefix is empty.
258 Setting the prefix to
260 the archive would be placed in
261 .IR foo/usr/lib/locale/locale-archive .
264 Suppress all notifications and warnings, and report only fatal errors.
267 Replace a locale in the locale archive file.
268 Without this option, if the locale is in the archive file already,
271 .BI \-\-warnings= warnings
272 Comma-separated list of warnings to enable.
273 Supported warnings are
278 .BR \-? ", " \-\-help
279 Print a usage summary and exit.
280 Also prints the default paths used by
284 Print a short usage summary and exit.
286 .BR \-V ", " \-\-version
287 Print the version number, license, and disclaimer of warranty for
290 One of the following exit values can be returned by
294 Command completed successfully.
297 Warnings or errors occurred, output files were written.
300 Errors encountered, no output created.
306 flag is assumed if this environment variable is set.
309 A colon-separated list of search directories for files.
312 .I /usr/share/i18n/charmaps
313 Usual default character map path.
315 .I /usr/share/i18n/locales
316 Usual default path for locale definition files.
318 .I /usr/share/i18n/repertoiremaps
319 Usual default repertoire map path.
321 .I /usr/lib/locale/locale-archive
322 Usual default locale archive location.
325 Usual default path for compiled individual locale data files.
327 .I outputpath/LC_ADDRESS
328 An output file that contains information about formatting of
329 addresses and geography-related items.
331 .I outputpath/LC_COLLATE
332 An output file that contains information about the rules for comparing
335 .I outputpath/LC_CTYPE
336 An output file that contains information about character classes.
338 .I outputpath/LC_IDENTIFICATION
339 An output file that contains metadata about the locale.
341 .I outputpath/LC_MEASUREMENT
342 An output file that contains information about locale measurements
343 (metric versus US customary).
345 .I outputpath/LC_MESSAGES/SYS_LC_MESSAGES
346 An output file that contains information about the language messages
347 should be printed in, and what an affirmative or negative answer looks
350 .I outputpath/LC_MONETARY
351 An output file that contains information about formatting of monetary
354 .I outputpath/LC_NAME
355 An output file that contains information about salutations for persons.
357 .I outputpath/LC_NUMERIC
358 An output file that contains information about formatting of nonmonetary
361 .I outputpath/LC_PAPER
362 An output file that contains information about settings related to
365 .I outputpath/LC_TELEPHONE
366 An output file that contains information about formats to be used with
369 .I outputpath/LC_TIME
370 An output file that contains information about formatting of data and
375 Compile the locale files for Finnish in the UTF\-8 character set
376 and add it to the default locale archive with the name
381 localedef \-f UTF\-8 \-i fi_FI fi_FI.UTF\-8
385 The next example does the same thing, but generates files into the
387 directory which can then be used by programs when the environment
390 is set to the current directory (note that the last argument must
395 localedef \-f UTF\-8 \-i fi_FI ./fi_FI.UTF\-8
402 .BR repertoiremap (5),