View all locale languages
# locale-a
# Locale-a|grep EN
View the language used by the current operating system
# echo $LANG
Set system locale language to Chinese environment (permanent)
# vi/etc/sysconfig/i18n
Lang= "ZH_CN. UTF-8 "
Set system locale language to English environment (permanent)
Lang= "en_US. UTF-8 "
Temporarily change the System locale language (exit this login is immediately invalid)
# Export LANG=ZH_CN. UTF-8
Install Chinese fonts
# yum Install Fonts-chinese.noarch
Specify the Chinese font path
# Vi/etc/x11/fs/config
- Catalogue =/usr/x11r6/lib/x11/fonts/misc:unscaled,
- /usr/x11r6/lib/x11/fonts/75dpi:unscaled,
- /usr/x11r6/lib/x11/fonts/100dpi:unscaled,
- /usr/x11r6/lib/x11/fonts/type1,
- /usr/share/fonts/default/type1,
- ,
- /usr/share/fonts/zh_cn/truetype,
- /usr/share/fonts/zh_tw/truetype
Method 2
Modifying the default locale variable values for the CentOS runtime environment
[Email protected] ~]# Vi/etc/profile
Locate the export statement and precede the statement by adding
Lang= "en_US. Utf-8″
and add lang behind the export.
Export PATH USER LOGNAME MAIL HOSTNAME histsize INPUTRC LANG
Save the configuration and modify the CentOS language to complete.
centos-Language Settings