CentOS6.8 Chinese/English environment switching tutorial diagram

CentOS6.8 Chinese/English environment switching tutorial diagram

1. Introduction

People who are not used to English may want to change the system from English to Chinese; while people who consider that if the client is not configured correctly, the Chinese directory may be displayed as garbled characters may prefer to change the system from Chinese to English.

Switching from Chinese to English actually means changing the value of LANG from the zh_CN-UTF8 character set to the en_US-UTF8 character set; similarly, switching from English to Chinese actually means changing the value of LANG from en_US-UTF8 to zh_CN-UTF8.

This article only takes the switching from Chinese to English as an example.

2. Change the Chinese environment to the English environment

The current desktop display is as follows:

The user's home directory is displayed as follows:

2.1 Use locale to view the currently used encoding and character set

locale

2.2 Use locale -a to view currently supported encodings and character sets

locale -a | grep en_US #locale -a will output all encodings and character sets supported by the current system, so I use grep here to filter only the en_US character set 

You can see en_US.utf8. Be sure to note that in the next step of modification, do not directly use en_US.utf8 here but write it in the form of en_US.UTF-8, otherwise the modification will not take effect and the system will continue to use the original Chinese encoding.

2.3 Modify the LANG variable in /etc/profile

echo 'export LANG=en_US.UTF-8' >> /etc/profile #Add reboot to the end of /etc/profile #Restart the operating system

2.4 Confirm to change the folder from Chinese to English

Log in to the host using the graphical interface, and the rename confirmation interface will appear. Click Confirm.

3. Description

3.1 Some tutorials say that you can just execute export LANG=en_US.UTF-8 . Is this really feasible?

Answer: Not feasible. At least from what I've tested, it's not feasible. In principle, this is an obvious dynamic modification method, and the impact can only act on the current session - and only the prompt information of the terminal changes from Chinese to English, the interface and directory remain in Chinese - exiting the current session or restarting the system will change back to the original Chinese.

3.2 Some tutorials say that /etc/sysconfig/i18n can be modified. Is this feasible?

Answer: According to tests on CentOS-6.8 and Redhat-6.5, modifying /etc/sysconfig/i18n changes the prompt in the terminal from Chinese to English, but the interface and directory cannot be changed to English. (However, it seems that when converting from English to Chinese, you can change it by modifying the /etc/sysconfig/i18n directory)

According to the test, /etc/profile has a higher priority than /etc/sysconfig/i18n.

3.3 Does the directory really change from Chinese to English? For example, does "Desktop" really change to "Desktop", and do the files originally on the "Desktop" move to the "Desktop"?

Answer: In actual operation, "Desktop" and "Desktop" are two folders.

When the environment is set to Chinese, the graphical interface displays the "Desktop" folder; when the environment is set to English, the graphical interface displays the "Desktop" folder. The files originally on the "Desktop" will not be automatically saved to the "Desktop", but will be saved in the "Desktop" folder.

Summarize

The above is the illustrated tutorial on switching the Chinese/English environment of CentOS6.8 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • CentOS 7 switching boot kernel and switching boot mode explanation
  • Example of switching between ordinary user and root user in CentOS command line
  • Install CentOS in VirtualBox to realize automatic mouse switching and copy and paste functions

<<:  6 ways to implement the maximum and minimum values ​​of an array in javascript

>>:  Detailed analysis and testing of SSD performance issues in MySQL servers

Recommend

The difference between distinct and group by in MySQL

Simply put, distinct is used to remove duplicates...

An example of how to quickly deploy web applications using Tomcat in Docker

After learning the basic operations of Docker, we...

Some summary of MySQL's fuzzy query like

1. Common usage: (1) Use with % % represents a wi...

Background image cache under IE6

CSS background image flickering bug in IE6 (backg...

How to configure Linux to use LDAP user authentication

I am using LDAP user management implemented in Ce...

HTML hyperlinks explained in detail

Hyperlink Hyperlinks are the most frequently used ...

How to modify create-react-app's configuration without using eject

1. Why is eject not recommended? 1. What changes ...

How to hide the version number and web page cache time in Nginx

Nginx optimization---hiding version number and we...

CSS multi-level menu implementation code

This is a pretty cool feature that makes web page...

Why can't the MP4 format video embedded in HTML be played?

The following code is in my test.html. The video c...

Analysis and solution of Chinese garbled characters in HTML hyperlinks

A hyperlink URL in Vm needs to be concatenated wit...

Docker online and offline installation and common command operations

1. Test environment name Version centos 7.6 docke...

Modify the style of HTML body in JS

Table of contents 1. Original Definition 2. JS op...