Question: How to add support for additional locales?
Locales on Linux are used to set the system’s language as well as other language-specific properties. This can include texts from error messages, log output, user interfaces, and if you are using a window manager such as Gnome, even Graphical User Interfaces (GUI). Locale settings can also define region-specific formatting such as paper sizes, numbers, and their natural sorting, currency information, and so on. They also define character encoding, which can be important if you choose a language that has characters that cannot be found in the standard ASCII encoding.
1. As a root user, execute the below command:
# dnf list glibc-langpack-*
From this full list of available locales, we will use the locale required by us.
2. In this example, we will use Spanish Locale for es_MX.UTF-8.
# dnf install glibc-langpack-es
3. Check the locale installed is available:
# localectl list-locales
4. Then set the language:
# localectl set-locale LANG=es_MX.UTF-8
5. Then confirm the status:
# localectl status
Output:
System Locale: LANG=es_MX.UTF-8 VC Keymap: us X11 Layout: us
Summary
Sometimes, single system users need different language settings than the system’s locale (which can only be set by the root user), according to their regional keyboard differences and for interacting with the system in their preferred human language. System-wide locales get inherited by every user as long as they are not overwritten by local environment variables.
Changing system-wide locales does not necessarily have an effect on your user’s locales if they have already defined something else for themselves.