Linux Commands Examples

A great documentation place for Linux commands

locale-gen

compile a list of locale definition files


see also : localedef - locale

Synopsis

locale-gen [options] [locale] [language] ...


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales
echo "export LC_CTYPE=en_US.UTF-8" >> ~/.bash_profile
source ~/.bash_profile

description

Compiled locale files take about 50MB of disk space, and most users only need few locales. In order to save disk space, compiled locale files are not distributed in the locales package, but selected locales are automatically generated when this package is installed by running the locale-gen program.

If a list of languages and/or locales is specified as arguments, then locale-gen only generates these particular locales and adds the new ones to /var/lib/locales/supported.d/local. Otherwise it generates all supported locales.

Locale data files can be stored either in a single archive file, /usr/lib/locale/locale-archive, or in a deep tree where individual files are stored under /usr/lib/locale/<locale_name>/LC_*. But unlike the locales package, compiled locale definitions are not removed when running locale-gen, and locales are compiled again only if locale source files have changed.

options

These options override settings found in /etc/belocs/locale-gen.conf.

--help

Display an help message and exit.

--purge

Remove all existing locales before processing.

--no-purge

Do not remove existing locales before processing.

--archive

When this option is set, locale data are stored in a single archive /usr/lib/locale/locale-archive.

--no-archive

When this option is set, locale data are stored in /usr/lib/locale/<locale_name>/LC_* files. This is the default.

--aliases=FILE

Locale aliases are read from FILE.

files

/var/lib/locales/supported.d/*

List all locales to generate. File format is similar to /usr/share/i18n/SUPPORTED.

/etc/belocs/locale-gen.conf

Customize how compiled locale files are stored onto disk.

/usr/lib/locale/<locale_name>/LC_*

Compiled locale data.

/usr/lib/locale/locale-archive

Generated archive containing compiled locale data, if --archive flag is set.

/var/lib/belocs

Directory used to keep track of changes in locale source files.


see also

locale def"> localedef , locale, locale-gen.conf.


author

The locale-gen program was originally written by Debian GNU libc maintainers, and has been improved by Denis Barbier <barbier[:at:]debian[:dot:]org> for the belocs-locales-bin package. This manual page has been rewritten from scratch to document the current behavior.

How can this site be more helpful to YOU ?


give  feedback