Manpage of LOCALEDEF
LOCALEDEFSection: Linux User Manual (1)
NAMElocaledef - compile locale definition files
localedef --delete-from-archive[options] localename ...
localedef --add-to-archive[options] compiledpath
DESCRIPTIONThe localedefprogram reads the indicated charmapand inputfiles, compiles them to a binary form quickly usable by the locale functions in the C library (setlocale(3), localeconv(3), etc.), and places the output in outputpath.
The outputpathargument is interpreted as follows:
- If outputpathcontains a slash character ('/'), it is interpreted as the name of the directory where the output definitions are to be stored. In this case, there is a separate output file for each locale category (LC_TIME, LC_NUMERIC, and so on).
- If the --no-archiveoption is used, outputpathis the name of a subdirectory in /usr/lib/localewhere per-category compiled files are placed.
- Otherwise, outputpathis the name of a locale and the compiled locale data is added to the archive file /usr/lib/locale/locale-archive. A locale archive is a memory-mapped file which contains all the system-provided locales; it is used by all localized programs when the environment variable LOCPATHis not set.
In any case, localedefaborts if the directory in which it tries to write locale files has not already been created.
Operation-selection optionsA few options direct localedefto do something other than compile locale definitions. Only one of these options should be used at a time.
- Delete the named locales from the locale archive file.
- List the locales contained in the locale archive file.
- Add the compiledpathdirectories to the locale archive file. The directories should have been created by runs of localedef, using --no-archive.
Other optionsSome of the following options are sensible only for certain operations; generally, it should be self-evident which ones.
- -f charmapfile, --charmap=charmapfile
- Specify the file that defines the character set that is used by the input file. If charmapfilecontains a slash character ('/'), it is interpreted as the name of the character map. Otherwise, the file is sought in the current directory and the default directory for character maps. If the environment variable I18NPATHis set, $I18NPATH/charmaps/and $I18NPATH/are also searched after the current directory. The default directory for character maps is printed by localedef --help.
- -i inputfile, --inputfile=inputfile
- Specify the locale definition file to compile. The file is sought in the current directory and the default directory for locale definition files. If the environment variable I18NPATHis set, $I18NPATH/locales/and $I18NPATHare also searched after the current directory. The default directory for locale definition files is printed by localedef --help.
- -u repertoirefile, --repertoire-map=repertoirefile
- Read mappings from symbolic names to Unicode code points from repertoirefile. If repertoirefilecontains a slash character ('/'), it is interpreted as the pathname of the repertoire map. Otherwise, the file is sought in the current directory and the default directory for repertoire maps. If the environment variable I18NPATHis set, $I18NPATH/repertoiremaps/and $I18NPATHare also searched after the current directory. The default directory for repertoire maps is printed by localedef --help.
- -A aliasfile, --alias-file=aliasfile
- Use aliasfileto look up aliases for locale names. There is no default aliases file.
- Set the prefix to be prepended to the full archive pathname. By default, the prefix is empty. Setting the prefix to foo, the archive would be placed in foo/usr/lib/locale/locale-archive.
- -c, --force
- Write the output files even if warnings were generated about the input file.
- -v, --verbose
- Generate extra warnings about errors that are normally ignored.
- Suppress all notifications and warnings, and report only fatal errors.
- Conform strictly to POSIX. Implies --verbose. This option currently has no other effect. POSIX conformance is assumed if the environment variable POSIXLY_CORRECTis set.
- Replace a locale in the locale archive file. Without this option, if the locale is in the archive file already, an error occurs.
- Do not use the locale archive file, instead create outputpathas a subdirectory in the same directory as the locale archive file, and create separate output files for locale categories in it. This is helpful to prevent system locale archive updates from overwriting custom locales created with localedef.
- -?, --help
- Print a usage summary and exit. Also prints the default paths used by localedef.
- Print a short usage summary and exit.
- -V, --version
- Print the version number, license, and disclaimer of warranty for localedef.
EXIT STATUSOne of the following exit values can be returned by localedef:
- Command completed successfully.
- Warnings or errors occurred, output files were written.
- Errors encountered, no output created.
- The --posixflag is assumed if this environment variable is set.
- A colon-separated list of search directories for files.
- Usual default character map path.
- Usual default path for locale definition files.
- Usual default repertoire map path.
- Usual default locale archive location.
- Usual default path for compiled individual locale data files.
- An output file that contains information about formatting of addresses and geography-related items.
- An output file that contains information about the rules for comparing strings.
- An output file that contains information about character classes.
- An output file that contains metadata about the locale.
- An output file that contains information about locale measurements (metric versus US customary).
- An output file that contains information about the language messages should be printed in, and what an affirmative or negative answer looks like.
- An output file that contains information about formatting of monetary values.
- An output file that contains information about salutations for persons.
- An output file that contains information about formatting of nonmonetary numeric values.
- An output file that contains information about settings related to standard paper size.
- An output file that contains information about formats to be used with telephone services.
- An output file that contains information about formatting of data and time values.
EXAMPLECompile the locale files for Finnish in the UTF-8 character set and add it to the default locale archive with the name fi_FI.UTF-8:
- localedef -f UTF-8 -i fi_FI fi_FI.UTF-8
Theexample does the same thing, but generates files into the fi_FI.UTF-8directory which can then be used by programs when the environment variable LOCPATHis set to the current directory (note that the last argument must contain a slash):
- localedef -f UTF-8 -i fi_FI ./fi_FI.UTF-8
SEE ALSOlocale(1), charmap(5), locale(5), repertoiremap(5), locale(7)
- EXIT STATUS
- CONFORMING TO
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 16:30:04 GMT, December 12, 2016 Click Here!