localedef - compile locale definition files
localedef [options] outputpath localedef --list-archive [options] localedef --delete-from-archive [options] localename ... localedef --add-to-archive [options] compiledpath localedef --version localedef --help localedef --usage
The localedef program reads the indicated charmap and input files, 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 outputpath argument is interpreted as follows: * If outputpath contains 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-archive option is used, outputpath is the name of a subdirectory in /usr/lib/locale where per-category compiled files are placed. * Otherwise, outputpath is 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 LOCPATH is not set. In any case, localedef aborts if the directory in which it tries to write locale files has not already been created. If no charmapfile is given, the value ANSI_X3.4-1968 (for ASCII) is used by default. If no inputfile is given, or if it is given as a dash (-), localedef reads from standard input.
Operation-selection options A few options direct localedef to do something other than compile locale definitions. Only one of these options should be used at a time. --delete-from-archive Delete the named locales from the locale archive file. --list-archive List the locales contained in the locale archive file. --add-to-archive Add the compiledpath directories to the locale archive file. The directories should have been created by previous runs of localedef, using --no-archive. Other options Some 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 charmapfile contains 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 I18NPATH is 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 I18NPATH is set, $I18NPATH/locales/ and $I18NPATH are 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 repertoirefile contains 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 I18NPATH is set, $I18NPATH/repertoiremaps/ and $I18NPATH are also searched after the current directory. The default directory for repertoire maps is printed by localedef --help. -A aliasfile, --alias-file=aliasfile Use aliasfile to look up aliases for locale names. There is no default aliases file. --prefix=pathname 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. --quiet Suppress all notifications and warnings, and report only fatal errors. --posix Conform strictly to POSIX. Implies --verbose. This option currently has no other effect. POSIX conformance is assumed if the environment variable POSIXLY_CORRECT is set. --replace Replace a locale in the locale archive file. Without this option, if the locale is in the archive file already, an error occurs. --no-archive Do not use the locale archive file, instead create outputpath as 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. --usage Print a short usage summary and exit. -V, --version Print the version number, license, and disclaimer of warranty for localedef.
One of the following exit values can be returned by localedef: 0 Command completed successfully. 1 Warnings or errors occurred, output files were written. 4 Errors encountered, no output created.
POSIXLY_CORRECT The --posix flag is assumed if this environment variable is set. I18NPATH A colon-separated list of search directories for files.
/usr/share/i18n/charmaps Usual default character map path. /usr/share/i18n/locales Usual default path for locale definition files. /usr/share/i18n/repertoiremaps Usual default repertoire map path. /usr/lib/locale/locale-archive Usual default locale archive location. /usr/lib/locale Usual default path for compiled individual locale data files. outputpath/LC_ADDRESS An output file that contains information about formatting of addresses and geography-related items. outputpath/LC_COLLATE An output file that contains information about the rules for comparing strings. outputpath/LC_CTYPE An output file that contains information about character classes. outputpath/LC_IDENTIFICATION An output file that contains metadata about the locale. outputpath/LC_MEASUREMENT An output file that contains information about locale measurements (metric versus US customary). outputpath/LC_MESSAGES/SYS_LC_MESSAGES An output file that contains information about the language messages should be printed in, and what an affirmative or negative answer looks like. outputpath/LC_MONETARY An output file that contains information about formatting of monetary values. outputpath/LC_NAME An output file that contains information about salutations for persons. outputpath/LC_NUMERIC An output file that contains information about formatting of nonmonetary numeric values. outputpath/LC_PAPER An output file that contains information about settings related to standard paper size. outputpath/LC_TELEPHONE An output file that contains information about formats to be used with telephone services. outputpath/LC_TIME An output file that contains information about formatting of data and time values.
POSIX.1-2008.
Compile 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 The next example does the same thing, but generates files into the fi_FI.UTF-8 directory which can then be used by programs when the environment variable LOCPATH is 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
locale(1), charmap(5), locale(5), repertoiremap(5), locale(7)
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.