Chapter 7. Installing and using langpacks

7.1. Introduction to langpacks

Langpacks are meta-packages which install extra add-on packages containing translations, dictionaries and locales for every package installed on the system.

On a Red Hat Enterprise Linux 8 system, langpacks installation is based on the langpacks-<langcode> language meta-packages and RPM weak dependencies (Supplements tag).

There are two prerequisites to be able to use langpacks for a selected language:

  1. The langpacks-<langcode> language meta-package for the selected language has been installed on the system.

    On Red Hat Enterprise Linux 8, the langpacks meta packages are installed automatically with the initial installation of the operating system using the Anaconda installer, because these packages are available in the in Application Stream repository.

    To find which languages provide langpacks, execute the following command:

    ~]# yum list langpacks-*
  2. The base package, for which you want to search the local packages, has already been installed on the system.

If these prerequisites are fulfilled, the language meta-packages pull their langpack for the selected language automatically in the transaction set.

7.2. Working with RPM weak dependency-based langpacks

7.2.1. Querying RPM weak dependency-based langpacks

To list the already installed language support, run the following command:

~]# yum list installed langpacks*

To check if any language support is available for another language, run the following command:

~]# yum list available langpacks*

To list what packages get installed for any language, run the following command:

~]# yum repoquery --whatsupplements langpacks-<locale_code>

7.2.2. Installing language support

To add new a language support, run the following command as the root user:

~]# yum install langpacks-<locale_code>

7.2.3. Removing language support

To remove any installed language support, run the following command as the root user:

~]# yum remove langpacks-<locale_code>

7.3. Saving disk space by using glibc-langpack-<locale_code>

Currently, all locales are stored in the /usr/lib/locale/locale-archive file, which requires a lot of disk space.

On systems where disk space is a critical issue, such as containers and cloud images, or only a few locales are needed, you can use the glibc locale langpack packages (glibc-langpack-<locale_code>). By using the following command instead of that described in Section 7.2.2, “Installing language support”, you can install locales individually and thus gain a smaller package installation footprint:

~]# yum install glibc-langpack-<locale_code>

When installing the operating system with Anaconda, glibc-langpack-<locale_code> is installed for the language you used during the installation and also for the languages you selected as additional languages. Note that glibc-all-langpacks, which contains all locales, is installed by default, so some locales are duplicated. If you installed glibc-langpack-<locale_code> for one or more selected languages, you can delete glibc-all-langpacks after the installation to save the disk space.

Note that installing only selected glibc-langpack-<locale_code> packages instead of glibc-all-langpacks has impact on run time performance.


If disk space is not an issue, keep all locales installed by using the glibc-all-langpacks package.