Setting the System Locale
System locale settings are stored in the /etc/locale.conf file and can be modified by the localectl command. These settings are read at early boot by the systemd daemon.
Displaying the Current Locale Status
To display the current locale status, run the following command:
localectl status
Example command output:
$ localectl status System Locale: LANG=zh_CN.UTF-8 VC Keymap: cn X11 Layout: cn
Listing Available Locales
To list available locales, run the following command:
localectl list-locales
Imagine you want to select a specific Chinese locale, but you are not sure if it is available on EulerOS. You can check that by listing all Chinese locales with the following command:
$ localectl list-locales | grep zh zh_CN zh_CN.gb18030 zh_CN.gb2312 zh_CN.gbk zh_CN.utf8 zh_HK zh_HK.big5hkscs zh_HK.utf8 zh_SG zh_SG.gb2312 zh_SG.gbk zh_SG.utf8 zh_TW zh_TW.big5 zh_TW.euctw zh_TW.utf8
Setting the Locale
To set the locale, run the following command as the root user:
localectl set-locale LANG=locale
Replace locale with the locale name you want to use. For example, if you want to use Simplified Chinese as the locale, run the following command as the root user:
# localectl set-locale LANG=zh_CN.utf8