The following column centos tutorial will introduce to you how CentOS7 supports Chinese display. I hope it will be helpful to friends in need!
1. Check whether the Chinese language pack is installed on the system
locale -a | grep "zh_CN" Command meaning: list The names of all available public language environments, including "zh_CN"
If the items shown in the picture appear, it means that the language pack has been installed in the system, no need Installing. The meaning is: {Language code_Country code}.{Character set}
zh: It is the code for Chinese.
CN: is the code name for China.
gb18030, gb2312, utf8, gbk: character set
2. If the Chinese language pack is not installed, install the Chinese language pack
yum groupinstall "fonts" (or <span class="hljs-comment">yum install kde-l10n-Chinese)</span>
##3. View the current language
locale
4. Change the i18n internationalization and locale.conf localization configuration files (below CentOS7)
Add at the beginning of the /etc/locale.conf file One line LANG=zh_CN.gbk, the result is as shown below:
CentOS7 modify vi /etc/locale.conf.
5. Restart the server to make the previous configuration take effect
Use the command rerootThe above is the detailed content of How CentOS7 supports Chinese display. For more information, please follow other related articles on the PHP Chinese website!