How to change language (locale)
$ sudo locale-gen en_US.UTF-8 Generating locales (this might take a while)... zh_CN.UTF-8... done en_US.UTF-8... done Generation complete. $ sudo locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=ja_JP.UTF-8 LANGUAGE= LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL= $
#SETUP LANGUAGE TO EN echo export LANGUAGE=en_US > ~/.i18n echo export LANG=en_US.UTF-8 >> ~/.i18n echo export LC_ALL=en_US.UTF-8 >> ~/.i18n
export LC_ALL="en_US.UTF-8" export LANG="en_US.UTF-8" export LANGUAGE="en_US"
sudo localedef -f UTF-8 -i en_US en_US.UTF-8 cp /etc/locale.gen /etc/locale.gen1 sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen sed -i 's/zh_CN.UTF-8 UTF-8/# zh_CN.UTF-8 UTF-8/g' /etc/locale.gen sudo locale-gen
sudo update-locale LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ALL="en_US.UTF-8"
How to use this command
#SETUP LANGUAGE TO EN echo export LANGUAGE=en_US > ~/.i18n echo export LANG=en_US.UTF-8 >> ~/.i18n echo export LC_ALL=en_US.UTF-8 >> ~/.i18n
export LC_ALL="en_US.UTF-8" export LANG="en_US.UTF-8" export LANGUAGE="en_US"
sudo localedef -f UTF-8 -i en_US en_US.UTF-8 cp /etc/locale.gen /etc/locale.gen1 sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen sed -i 's/zh_CN.UTF-8 UTF-8/# zh_CN.UTF-8 UTF-8/g' /etc/locale.gen sudo locale-gen
sudo update-locale LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ALL="en_US.UTF-8"
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "zh_CN.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Extracting templates from packages: 100% Preconfiguring packages ...
You can save it to a script file. Ex: MySetup.sh, then run it like this: bash ./MySetup.sh
To change the language inside the container, simply run the tmoe command, select “Manager” and navigate to the locale settings. The root filesystem was built using tmoe, so locale configuration is handled through it. You will also need to update the LANG=zh_CN.UTF-8 environment variable in the startup command (go to Control → Advanced Settings → Startup Command) when switching to another language.