Last week I had to do some debugging to do to work with an SMS application with Chinese characters, so I had to modify a lot the locale settings.
Here are the commands you should use to modify your environment for a default language settings.
the command : $ locale
lists your current language environment.
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
These are all environment variables defined when your computer starts. You can modify them temporarily (until the next reboot) with the export command.
Instead of having to export all of them, you can just use the command
export LC_ALL="zh_CN.utf8" for ex. , that will modify all of them at once
(check it by typing locale, and by using a command such as "man", it should display the prompt in the new language.)
If you want to conserve this locale the next time you reboot, you also have to edit a configuration file in /etc. It should be either /etc/default/locale or /etc/environment depending on your system
Here are the commands you should use to modify your environment for a default language settings.
the command : $ locale
lists your current language environment.
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
These are all environment variables defined when your computer starts. You can modify them temporarily (until the next reboot) with the export command.
Instead of having to export all of them, you can just use the command
export LC_ALL="zh_CN.utf8" for ex. , that will modify all of them at once
(check it by typing locale, and by using a command such as "man", it should display the prompt in the new language.)
If you want to conserve this locale the next time you reboot, you also have to edit a configuration file in /etc. It should be either /etc/default/locale or /etc/environment depending on your system
Commentaires
Enregistrer un commentaire
Tell me what you think