How To Install gettext on CentOS 8

gettext is GNU libraries and utilities for producing multi-lingual messages

Introduction

In this tutorial we learn how to install gettext on CentOS 8.

What is gettext

The GNU gettext package provides a set of tools and documentation for producing multi-lingual messages in programs. Tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs, a runtime library which supports the retrieval of translated messages, and stand-alone programs for handling the translatable and the already translated strings. Gettext provides an easy to use library and tools for creating, using, and modifying natural language catalogs and is a powerful and simple method for internationalizing programs.

We can use yum or dnf to install gettext on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install gettext.

Install gettext on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install gettext using dnf by running the following command:

sudo dnf -y install gettext

Install gettext on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install gettext using yum by running the following command:

sudo yum -y install gettext

How To Uninstall gettext on CentOS 8

To uninstall only the gettext package we can use the following command:

sudo dnf remove gettext

gettext Package Contents on CentOS 8

/usr/bin/envsubst
/usr/bin/gettext
/usr/bin/gettext.sh
/usr/bin/msgattrib
/usr/bin/msgcat
/usr/bin/msgcmp
/usr/bin/msgcomm
/usr/bin/msgconv
/usr/bin/msgen
/usr/bin/msgexec
/usr/bin/msgfilter
/usr/bin/msgfmt
/usr/bin/msggrep
/usr/bin/msginit
/usr/bin/msgmerge
/usr/bin/msgunfmt
/usr/bin/msguniq
/usr/bin/ngettext
/usr/bin/recode-sr-latin
/usr/bin/xgettext
/usr/lib/.build-id
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/c5c615871f122db825cda0574779ee370b3978
/usr/lib/.build-id/12
/usr/lib/.build-id/12/860d8764aece61250250d68d59e3d2050a582c
/usr/lib/.build-id/19
/usr/lib/.build-id/19/b386ed6b7e527ac39fd1820687e317fd8fd545
/usr/lib/.build-id/1e
/usr/lib/.build-id/1e/f8c3358f14b22d419eb211095f040760b58612
/usr/lib/.build-id/22
/usr/lib/.build-id/22/e20bcaaca5ed745d4f5f319ce3cc15e0db8d56
/usr/lib/.build-id/28
/usr/lib/.build-id/28/9bbfc50fea9cf2c8a10fe6995f6485ed349274
/usr/lib/.build-id/2e
/usr/lib/.build-id/2e/27c6fb335d0c36df61daecb2e0e60007e6eb03
/usr/lib/.build-id/2f
/usr/lib/.build-id/2f/ebe95ec5278d531f16c451ef3ee2df3366be3f
/usr/lib/.build-id/30
/usr/lib/.build-id/30/24c93dc94f70ffec59f05247f53c9b9de200ed
/usr/lib/.build-id/32
/usr/lib/.build-id/32/5cd9577c022b2bd07c7d7272cc29b2155cc69f
/usr/lib/.build-id/38
/usr/lib/.build-id/38/fbcc645af9611681aa8766bdd5d0aa2ae45989
/usr/lib/.build-id/42
/usr/lib/.build-id/42/75191d1299daaf6bf4aa28fd7cdf9525ce24f4
/usr/lib/.build-id/49
/usr/lib/.build-id/49/010bcee2426c8d89eaf21d37aefe00c68ae155
/usr/lib/.build-id/53
/usr/lib/.build-id/53/67f80676b8d0b1a664483f1aa52905ef10eedb
/usr/lib/.build-id/59
/usr/lib/.build-id/59/54f5cb4300140fc6a29a0819c3ff01837b4392
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/491d8f20cfb29b5ca93705b1a6124090e56bc2
/usr/lib/.build-id/ab
/usr/lib/.build-id/ab/cec16c4e7734da962088204000a54e7c3ab99f
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/8f31bb15f1f04ea7f8088f83c2fc998aec3dd2
/usr/lib/.build-id/c6
/usr/lib/.build-id/c6/985d976f37e630639effdf94ff2411f65933ad
/usr/lib/.build-id/eb
/usr/lib/.build-id/eb/985714aad093f1fbf03c82d5fbe714dd1bf53c
/usr/lib/.build-id/f4
/usr/lib/.build-id/f4/f87ffebbfde4cd53c7147327eeb1294d188c4d
/usr/lib/.build-id/fc
/usr/lib/.build-id/fc/c1d21ffa844c0d4576fbaeba5362d6b2a7d259
/usr/lib64/gettext
/usr/lib64/gettext/cldr-plurals
/usr/lib64/gettext/hostname
/usr/lib64/gettext/project-id
/usr/lib64/gettext/urlget
/usr/lib64/gettext/user-email
/usr/share/doc/gettext
/usr/share/doc/gettext/AUTHORS
/usr/share/doc/gettext/BUGS
/usr/share/doc/gettext/COPYING
/usr/share/doc/gettext/COPYING.LIB
/usr/share/doc/gettext/DISCLAIM
/usr/share/doc/gettext/NEWS
/usr/share/doc/gettext/README
/usr/share/doc/gettext/THANKS
/usr/share/doc/gettext/envsubst.1.html
/usr/share/doc/gettext/gettext.1.html
/usr/share/doc/gettext/ngettext.1.html
/usr/share/gettext
/usr/share/gettext-0.19.8
/usr/share/gettext-0.19.8/its
/usr/share/gettext-0.19.8/its/appdata.its
/usr/share/gettext-0.19.8/its/appdata.loc
/usr/share/gettext-0.19.8/its/glade.loc
/usr/share/gettext-0.19.8/its/glade1.its
/usr/share/gettext-0.19.8/its/glade2.its
/usr/share/gettext-0.19.8/its/gsettings.its
/usr/share/gettext-0.19.8/its/gsettings.loc
/usr/share/gettext-0.19.8/its/gtkbuilder.its
/usr/share/gettext/ABOUT-NLS
/usr/share/gettext/its
/usr/share/gettext/po
/usr/share/gettext/po/Makefile.in.in
/usr/share/gettext/po/Makevars.template
/usr/share/gettext/po/Rules-quot
/usr/share/gettext/po/boldquot.sed
/usr/share/gettext/po/[email protected]
/usr/share/gettext/po/[email protected]
/usr/share/gettext/po/insert-header.sin
/usr/share/gettext/po/quot.sed
/usr/share/gettext/po/remove-potcdate.sin
/usr/share/gettext/styles
/usr/share/gettext/styles/po-default.css
/usr/share/gettext/styles/po-emacs-x.css
/usr/share/gettext/styles/po-emacs-xterm.css
/usr/share/gettext/styles/po-emacs-xterm16.css
/usr/share/gettext/styles/po-emacs-xterm256.css
/usr/share/gettext/styles/po-vim.css
/usr/share/info/gettext.info.gz
/usr/share/locale/be/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/be/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/bg/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/bg/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ca/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/ca/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/cs/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/cs/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/da/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/da/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/de/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/de/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/el/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/el/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/en@boldquot/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/en@quot/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/eo/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/es/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/es/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/et/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/et/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/eu/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/fi/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/fi/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/fr/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/fr/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ga/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/gl/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/gl/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/hr/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/hu/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/id/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/id/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/it/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/it/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ja/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/ja/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ko/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/ko/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/nb/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/nb/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/nl/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/nl/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/nn/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/nn/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/pa/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/pl/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/pl/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/pt/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/pt/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/pt_BR/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ro/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/ro/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/ru/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/ru/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/sk/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/sk/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/sl/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/sl/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/sr/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/sr/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/sv/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/sv/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/tr/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/tr/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/uk/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/uk/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/vi/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/vi/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gettext-tools.mo
/usr/share/locale/zh_HK/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gettext-runtime.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gettext-tools.mo
/usr/share/man/man1/envsubst.1.gz
/usr/share/man/man1/gettext.1.gz
/usr/share/man/man1/gettextize.1.gz
/usr/share/man/man1/msgattrib.1.gz
/usr/share/man/man1/msgcat.1.gz
/usr/share/man/man1/msgcmp.1.gz
/usr/share/man/man1/msgcomm.1.gz
/usr/share/man/man1/msgconv.1.gz
/usr/share/man/man1/msgen.1.gz
/usr/share/man/man1/msgexec.1.gz
/usr/share/man/man1/msgfilter.1.gz
/usr/share/man/man1/msgfmt.1.gz
/usr/share/man/man1/msggrep.1.gz
/usr/share/man/man1/msginit.1.gz
/usr/share/man/man1/msgmerge.1.gz
/usr/share/man/man1/msgunfmt.1.gz
/usr/share/man/man1/msguniq.1.gz
/usr/share/man/man1/ngettext.1.gz
/usr/share/man/man1/recode-sr-latin.1.gz
/usr/share/man/man1/xgettext.1.gz

References

Summary

In this tutorial we learn how to install gettext on CentOS 8 using yum and dnf.