locale-gen(8)

NAME
locale-gen — safely compile and install a glibc locale archive

SYNOPSIS
locale-gen [-A] [-q] [-u] [-c config] [-j jobs] [-p prefix]
locale-gen -h
locale-gen -V

DESCRIPTION
The locale-gen utility provides a means by which a system administrator may conveniently manage the set of locales that are made available to the GNU C Library. It accomplishes this by acting as a user-friendly frontend for the localedef(1) utility, which is used to compile locales and integrate them into a central archive.

By default, locale-gen generates an archive containing a full complement of supported locales, numbering 500 or more. However, it is typical for an administrator to require only a few of them. In that case, the config file may be populated with a list of the required locales. Consequently, locale-gen shall compile only those, saving both time and space.

OPTIONS

-A, --all
    Compile all locales that are officially supported by glibc. Cannot be combined with the -c option.

-c, --config config
    Read the given config file (defaults to prefix/etc/locale.gen). If specified as a <hyphen-minus>, the configuration shall be read from standard input. If the file contains no locales or is missing, locale-gen shall act as if the -A option had been specified.

-h, --help
    Write out a synopsis and summary of the supported options then exit.

-j, --jobs jobs
    Spawn up to the specified number of jobs to compile locales in parallel (defaults to the number of logical processors).

-p, --prefix prefix
    Treat FILES as being relative to the specified prefix (defaults to / if not a Gentoo Prefix system). Where explicitly specified, the config file shall be exempted from this behaviour.

-q, --quiet
    Suppress the writing of informational messages to standard output.

-u, --update
    Suppress the compilation of locales that are already installed (not recommended).

-V, --version
    Write out some details regarding the program then exit.

FILES

/etc/locale.gen
    The default location of the config file. It specifies the locales to be compiled.

/usr/share/i18n/SUPPORTED
    A complete list of valid locale declarations, as provided by glibc.

/usr/share/i18n/locales
    Contains locale definition files that serve as inputs to localedef(1).

/usr/share/i18n/charmaps
    Contains character map files that serve as inputs to localedef(1).

/usr/lib/locale/locale-archive
    Contains the currently installed locales.

ENVIRONMENT

LOCALEGEN_ALLOW_UNSUPPORTED
    If set as a non-empty string, locale-gen shall convey validation errors as warnings. Validation is performed by comparing the entries of the config file against the /usr/share/i18n/SUPPORTED file.

LOCALEGEN_CONFIG
    Defines the path of the config file in the absence of the -A and -c options.

NO_COLOR
    If set as a non-empty string, coloured output shall be disabled.

EXIT STATUS
The exit status shall be 0 under any of these conditions:

•   the -h and/or -V options were specified

•   the -u option was specified but no locales need compiling

•   the options and config were validated, the specified locales compiled and the resulting archive installed, without error

Otherwise, the exit status shall be greater than 0.

SEE ALSO
locale.gen(5), localectl(1), locale(1), localedef(1)

AUTHORS
Kerin Millar (kfm@plushkava.net)
Mike Frysinger (vapier@google.com)

REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/.