Home > Article > Operation and Maintenance > How CentOS7 supports Chinese display
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
You can see that there is no Chinese among the languages currently displayed by my system.
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:Then change the content of the i18n file, which is in the /etc/sysconfig/ directory , if this file does not exist, use touch i18n to create it. Add the following two lines at the beginning of the file: LANG=zh_CN.gbkLC_ALL=zh_CN.gbkThe effect is as follows:
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!