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