The first step, edit the file
sudo vi/var/lib/locales/supported.d/local
Write the relevant content, such as write the following content:
Zh_cn. UTF-8 UTF-8ZH_CN GB2312ZH_CN. GBK Gbken_us. UTF-8 UTF-8ZH_CN. GB18030 GB18030
This file is a list of all active regional languages
The second step is to generate the relevant locales
sudo locale-gen--purge
Step three, edit the file
sudo vi/etc/default/locale
Write the relevant content. For example, write the following:
Lang= "ZH_CN. UTF-8 "language=" Zh_cn:zh "lc_all=" ZH_CN. UTF-8 "
After restarting the computer, the terminal Input command locale, to see if the command error, the normal result is as follows:
Code: ~$ Locale
Lang=zh_cn. UTF-8
Language=zh_cn:en
Lc_ctype= "ZH_CN. UTF-8 "
Lc_numeric= "ZH_CN. UTF-8 "
Lc_time= "ZH_CN. UTF-8 "
Lc_collate= "ZH_CN. UTF-8 "
Lc_monetary= "ZH_CN. UTF-8 "
Lc_messages= "ZH_CN. UTF-8 "
Lc_paper= "ZH_CN. UTF-8 "
Lc_name= "ZH_CN. UTF-8 "
Lc_address= "ZH_CN. UTF-8 "
Lc_telephone= "ZH_CN. UTF-8 "
Lc_measurement= "ZH_CN. UTF-8 "
Lc_identification= "ZH_CN. UTF-8 "
Lc_all=zh_cn. UTF-8
Ubuntu under Locale settings