1localedef(1)                General Commands Manual               localedef(1)
2
3
4

NAME

6       localedef - compile locale definition files
7

SYNOPSIS

9       localedef [options] outputpath
10
11       localedef --add-to-archive [options] compiledpath
12
13       localedef --delete-from-archive [options] localename ...
14
15       localedef --list-archive [options]
16
17       localedef --help
18
19       localedef --usage
20
21       localedef --version
22

DESCRIPTION

24       The localedef program reads the indicated charmap and input files, com‐
25       piles them to a binary form quickly usable by the locale  functions  in
26       the  C library (setlocale(3), localeconv(3), etc.), and places the out‐
27       put in outputpath.
28
29       The outputpath argument is interpreted as follows:
30
31       •  If outputpath contains a slash character ('/'), it is interpreted as
32          the  name  of  the  directory where the output definitions are to be
33          stored.  In this case, there is a separate output file for each  lo‐
34          cale category (LC_TIME, LC_NUMERIC, and so on).
35
36       •  If the --no-archive option is used, outputpath is the name of a sub‐
37          directory in /usr/lib/locale where per-category compiled  files  are
38          placed.
39
40       •  Otherwise,  outputpath  is the name of a locale and the compiled lo‐
41          cale data is added to the  archive  file  /usr/lib/locale/locale-ar‐
42          chive.   A locale archive is a memory-mapped file which contains all
43          the system-provided locales; it is used by  all  localized  programs
44          when the environment variable LOCPATH is not set.
45
46       In  any  case,  localedef  aborts if the directory in which it tries to
47       write locale files has not already been created.
48
49       If no charmapfile is given, the value  ANSI_X3.4-1968  (for  ASCII)  is
50       used by default.  If no inputfile is given, or if it is given as a dash
51       (-), localedef reads from standard input.
52

OPTIONS

54   Operation-selection options
55       A few options direct localedef to do something other than  compile  lo‐
56       cale definitions.  Only one of these options should be used at a time.
57
58       --add-to-archive
59              Add  the  compiledpath  directories  to the locale archive file.
60              The directories should have been created by previous runs of lo‐
61              caledef, using --no-archive.
62
63       --delete-from-archive
64              Delete the named locales from the locale archive file.
65
66       --list-archive
67              List the locales contained in the locale archive file.
68
69   Other options
70       Some of the following options are sensible only for certain operations;
71       generally, it should be self-evident which ones.  Notice that -f and -c
72       are reversed from what you might expect; that is, -f is not the same as
73       --force.
74
75       -f charmapfile, --charmap=charmapfile
76              Specify the file that defines the character set that is used  by
77              the  input  file.   If  charmapfile  contains  a slash character
78              ('/'), it is interpreted as the name of the character map.  Oth‐
79              erwise,  the file is sought in the current directory and the de‐
80              fault directory for character maps.  If the environment variable
81              I18NPATH  is  set,  $I18NPATH/charmaps/  and $I18NPATH/ are also
82              searched after the current directory.  The default directory for
83              character maps is printed by localedef --help.
84
85       -i inputfile, --inputfile=inputfile
86              Specify  the  locale  definition  file  to compile.  The file is
87              sought in the current directory and the  default  directory  for
88              locale  definition  files.  If the environment variable I18NPATH
89              is set, $I18NPATH/locales/ and $I18NPATH are also searched after
90              the current directory.  The default directory for locale defini‐
91              tion files is printed by localedef --help.
92
93       -u repertoirefile, --repertoire-map=repertoirefile
94              Read mappings from symbolic names to Unicode  code  points  from
95              repertoirefile.   If  repertoirefile  contains a slash character
96              ('/'), it is interpreted as the pathname of the repertoire  map.
97              Otherwise,  the  file is sought in the current directory and the
98              default directory for repertoire maps.  If the environment vari‐
99              able  I18NPATH  is  set, $I18NPATH/repertoiremaps/ and $I18NPATH
100              are also searched after the current directory.  The default  di‐
101              rectory for repertoire maps is printed by localedef --help.
102
103       -A aliasfile, --alias-file=aliasfile
104              Use  aliasfile to look up aliases for locale names.  There is no
105              default aliases file.
106
107       -c, --force
108              Write the output files even if warnings were generated about the
109              input file.
110
111       -v, --verbose
112              Generate extra warnings about errors that are normally ignored.
113
114       --big-endian
115              Generate big-endian output.
116
117       --little-endian
118              Generate little-endian output.
119
120       --no-archive
121              Do not use the locale archive file, instead create outputpath as
122              a subdirectory in the same directory as the locale archive file,
123              and  create  separate  output files for locale categories in it.
124              This is helpful to prevent system locale  archive  updates  from
125              overwriting custom locales created with localedef.
126
127       --no-hard-links
128              Do not create hard links between installed locales.
129
130       --no-warnings=warnings
131              Comma-separated list of warnings to disable.  Supported warnings
132              are ascii and intcurrsym.
133
134       --posix
135              Conform strictly to POSIX.  Implies --verbose.  This option cur‐
136              rently has no other effect.  POSIX conformance is assumed if the
137              environment variable POSIXLY_CORRECT is set.
138
139       --prefix=pathname
140              Set the prefix to be prepended to the full archive pathname.  By
141              default,  the  prefix  is empty.  Setting the prefix to foo, the
142              archive would be placed in foo/usr/lib/locale/locale-archive.
143
144       --quiet
145              Suppress all notifications and warnings, and report  only  fatal
146              errors.
147
148       --replace
149              Replace  a  locale in the locale archive file.  Without this op‐
150              tion, if the locale is in the archive file already, an error oc‐
151              curs.
152
153       --warnings=warnings
154              Comma-separated  list of warnings to enable.  Supported warnings
155              are ascii and intcurrsym.
156
157       -?, --help
158              Print a usage summary and exit.  Also prints the  default  paths
159              used by localedef.
160
161       --usage
162              Print a short usage summary and exit.
163
164       -V, --version
165              Print  the  version  number, license, and disclaimer of warranty
166              for localedef.
167

EXIT STATUS

169       One of the following exit values can be returned by localedef:
170
171       0      Command completed successfully.
172
173       1      Warnings or errors occurred, output files were written.
174
175       4      Errors encountered, no output created.
176

ENVIRONMENT

178       POSIXLY_CORRECT
179              The --posix flag is assumed if this environment variable is set.
180
181       I18NPATH
182              A colon-separated list of search directories for files.
183

FILES

185       /usr/share/i18n/charmaps
186              Usual default character map path.
187
188       /usr/share/i18n/locales
189              Usual default path for locale definition files.
190
191       /usr/share/i18n/repertoiremaps
192              Usual default repertoire map path.
193
194       /usr/lib/locale/locale-archive
195              Usual default locale archive location.
196
197       /usr/lib/locale
198              Usual default path for compiled individual locale data files.
199
200       outputpath/LC_ADDRESS
201              An output file that contains information about formatting of ad‐
202              dresses and geography-related items.
203
204       outputpath/LC_COLLATE
205              An  output  file  that  contains information about the rules for
206              comparing strings.
207
208       outputpath/LC_CTYPE
209              An  output  file  that  contains  information  about   character
210              classes.
211
212       outputpath/LC_IDENTIFICATION
213              An output file that contains metadata about the locale.
214
215       outputpath/LC_MEASUREMENT
216              An  output  file that contains information about locale measure‐
217              ments (metric versus US customary).
218
219       outputpath/LC_MESSAGES/SYS_LC_MESSAGES
220              An output file that contains information about the language mes‐
221              sages  should be printed in, and what an affirmative or negative
222              answer looks like.
223
224       outputpath/LC_MONETARY
225              An output file that contains  information  about  formatting  of
226              monetary values.
227
228       outputpath/LC_NAME
229              An  output  file that contains information about salutations for
230              persons.
231
232       outputpath/LC_NUMERIC
233              An output file that contains  information  about  formatting  of
234              nonmonetary numeric values.
235
236       outputpath/LC_PAPER
237              An  output file that contains information about settings related
238              to standard paper size.
239
240       outputpath/LC_TELEPHONE
241              An output file that contains information  about  formats  to  be
242              used with telephone services.
243
244       outputpath/LC_TIME
245              An  output  file  that  contains information about formatting of
246              data and time values.
247

STANDARDS

249       POSIX.1-2008.
250

EXAMPLES

252       Compile the locale files for Finnish in the UTF-8 character set and add
253       it to the default locale archive with the name fi_FI.UTF-8:
254
255           localedef -f UTF-8 -i fi_FI fi_FI.UTF-8
256
257       The  next  example  does  the  same thing, but generates files into the
258       fi_FI.UTF-8 directory which can then be used by programs when the envi‐
259       ronment variable LOCPATH is set to the current directory (note that the
260       last argument must contain a slash):
261
262           localedef -f UTF-8 -i fi_FI ./fi_FI.UTF-8
263

SEE ALSO

265       locale(1), charmap(5), locale(5), repertoiremap(5), locale(7)
266
267
268
269Linux man-pages 6.04              2023-03-12                      localedef(1)
Impressum