Modify centos7 system language:
Recommended: "centos usage tutorial"
View the current language package locale
Check the system has language pack
locale -a
(zh_CN.UTF-8 is Simplified Chinese, if there is no zh_CN.UTF-8, install the language pack, if it exists, you can set it directly)
Install Simplified Chinese language pack
yum install kde-l10n-Chinese
Set to Chinese
Temporary modification, the previous settings will be restored after restarting the server
LANG="zh_CN.UTF-8" #修改为中文 LANG="en_US.UTF-8" #修改为英文
Permanent modification requires configuration Write into the file
Method (1)
vi /etc/locale.conf
##Add the following content to the first line to set Chinese
LANG=zh_CN.UTF8
Method (2)
localectl set-locale LANG=zh_CN.UTF8
Recommended learning
Linux video tutorial: https://www.php.cn/course/list/33. html
The above is the detailed content of How to change the language to Chinese in centos. For more information, please follow other related articles on the PHP Chinese website!