After installing the Gentoo Linux, display Chinese is the urgent matter, in fact Gentoo's document has done very well, here to remember, next time can be set quickly.
STEP1 Settings Locale
1> edit/etc/locale.gen, add two lines at the end of the ZH_CN. UTF-8 UTF-8 "and" ZH_CN. GBK GBK ", as follows
Zh_cn. UTF-8 UTF-8 ZH_CN. GBK GBK EN_GB. UTF-8 UTF-8
2> run the Locale-gen command to generate the locale:
#locale-gen
3> edit/etc/env.d/02locale, if not then create, add a line "lang=" ZH_CN. GBK "", as follows:
#nano/etc/env.d/02locale # #02locale内容简单如下就ok了 lang= "ZH_CN. GBK "
4> Run env-update Update environment
#env-update
Step2 Install fonts
After STEP1 set the encoding is already Chinese, you can run the locale command view, but because the default font can not display Chinese, but will garbled. So I'm going to change a font.
1> Choose your favorite font, TTC or TTF format, such as imitation SIMSUN.TTC
2> copy to any directory, such as/usr/share/fonts/ttf, and then execute the following font-related commands
#cp Simsun.ttc/usr/share/fonts/ttf/simsun.ttf #cd/usr/share/fonts/ttf #sudo chmod 644 Simsun.ttf #sudo mkfontdir #sudo m Kfontscale
3> Configure the font display for X Window
#编辑配置文件 #nano/etc/x11/xorg.conf #在Files section, no creation, the following "Files" ... Fontpath "/usr/share/fonts/ttf" ... Endsection
4> Update Font configuration
#sudo FC-CACHE-FV
STEP3 Installation Chinese Input Method
1> Update Portage Tree
#emerge--sync
2> Find Scim or FCITX
#emerge--serach SCIM
3> installation Scim-pinyin
#emerge Scim-pinyin
STEP4 display Chinese filename
1> This is actually mounted when no encoding is specified, note that the encoding for the current system is consistent, as follows:
#我locale设置的是gbk, so use gb2312 and, if it is Utf-8, specify UTF8 #mount/dev/sda1/mnt/system-o iocharset=gb2312
After completing these steps, restart KDE, the Chinese environment will be OK ~