Home  >  Article  >  Operation and Maintenance  >  How CentOS7 supports Chinese display

How CentOS7 supports Chinese display

藏色散人
藏色散人forward
2020-09-14 17:51:058234browse

The following column centos tutorial will introduce to you how CentOS7 supports Chinese display. I hope it will be helpful to friends in need!

How CentOS7 supports Chinese display

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.gbk

LC_ALL=zh_CN.gbk

The effect is as follows:

CentOS7 modify vi /etc/locale.conf.

5. Restart the server to make the previous configuration take effect

Use the command reroot

The above is the detailed content of How CentOS7 supports Chinese display. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete