How to configure a multi-language environment for Linux systems?

  

This article mainly describes how to configure a multi-language environment for Linux systems, including the encoding modification method. Let's take the two Ubuntu and CentOS users as examples. Need friends can refer to the next.

modify /etc /sysconfig /i18n file, such as

LANG = & ldquo; en_US.UTF-8 & rdquo;, xwindow interface displays in English,

LANG = “zh_CN.GB18030”, xwindow will display the Chinese interface.

There is also a way cp /etc/sysconfig/i18n $HOME/.i18n to modify the $HOME/.i18n file, such as

LANG=“en_US.UTF-8”,xwindow will Display English interface,

LANG=“zh_CN.GB18030”, xwindow will display Chinese interface.

This will change the personal interface language without affecting other users.

The modified /etc/sysconfig/i18n file is:

The code is as follows:

LANG=“en_US.UTF-8”

SUPPORTED =“zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en”

SYSFONT=“latarcyrheb-sun16”

LC_ALL=“en_US.UTF-8&rdquo ;

export LC_ALL

Restart after setting or use rc.local to make

or modify the login user's .bash_profile file to add

The code is as follows:

export LANG=zh_CN.GB18030

export LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN

Ubuntu

For example, change the Ubuntu system locale English en_US.UTF-8:

View the current system locale, edit the configuration file, change zh_US.UTF-8 to en_US.UTF-8, and change to en

code As follows:

sudo nano /etc/default/locale

LANG=“en_US.UTF-8”

LANGUAGE=“en_US:en”

CentOS:

Method 1. Use a CD or a medium equivalent to a CD

The code is as follows:

# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom

# rpm -ivh fonts-chinese

Method 2, the code is as follows:

# yum install fonts-chinese

After installation, set the language of the system You can use the desktop mode or the character mode. After modification, the following contents can be included:

The code is as follows:

vim /etc/sysconfig/i18n

The code is as follows: Br>

LANG=“zh_CN.GB2312”

LANGUAGE=“zh_CN.GB18030:zh_CN.GB2312:zh_CN”

SUPPORTED=“zh_CN.GB18030:zh_CN.GB2312 :zh_CN.UTF-8:zh:en_US.UTF-8:en_US:en:ja_JP.UTF-8:ja_JP:ja”

SYSFONT=“lat0-sun16”

SYSFONTACM =“8859-15”

The above is the basic method of how to configure a multi-language environment for Linux systems, if you are still worried about how to configure multi-language environment for Linux system Then you can follow the above mentioned extraordinary way to operate, everything is action-oriented practice, it would quickly choose one of your own favorite way to operate it!

Copyright © Windows knowledge All Rights Reserved