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