If we select the English language environment when installing the debian basic system and want to change it to Chinese, we need to complete the following work. Set locale if the locale tool is not installed, first install it, and then run # dpkg-reconfigurelocales to select the language pack. You need to add several options starting with zh_CN
If we select the English language environment when installing the debian basic system and want to change it to Chinese, we need to complete the following work.
Set locale
If the locale tool is not installed, install it first and then run
# Dpkg-reconfigure locales
Select a language pack. You need to add several options starting with zh_CN. you can also add only one option, and then select one of them as the default option. After setting, run the locale command to check whether the current locale setting is Chinese.
Install Chinese fonts
The Chinese environment certainly requires support for Chinese fonts. manually add Chinese xft fonts. we have already mentioned in another article. In addition, we can also use apt to install several free Chinese fonts. For example:
# Apt-get install ttf-arphic-gbsn00lp
# Apt-get install ttf-arphic-gkai00mp
Restart X
If we restart X and find that the entire system interface is still displayed in English, and use the locale command to check that the locale settings of the system have been correctly configured as Chinese. I encountered the problem that some application titles were displayed in Chinese, but the tool menus and file managers were displayed in English. This is probably because the environment variables in the/etc/enviroment file are set incorrectly. Open the/etc/enviroment file and usually find the following two fields:
LANGUAGE = "en_US: en"
LANG = "zh_CN"
Add Chinese characters in the LANGUAGE field, for example:
LANGUAGE = "zh_CN: zh: en_US: en"
Restart X to change the language environment of the system to Chinese.
Main steps:
# Reconfigure locales
1. dpkg-reconfigure locales
2. select a language in the dialog box.
3. less/etc/environment
Change to the following lines:
LC_ALL = "zh_CN.UTF-8"
LANG = "zh_CN.UTF-8"
LANGUAGE = "zh_CN.UTF-8: zh: en_US: en"
Restart your computer
Locale charmap
Output: UTF-8
"OK"