ubuntu change locale

1
2
3
4
locale
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
sudo vi /etc/default/locale

# File generated by update-locale
LANG=en_US.UTF-8
#LC_NUMERIC=”lzh_TW”
#LC_TIME=”lzh_TW”
#LC_MONETARY=”lzh_TW”
#LC_PAPER=”lzh_TW”
#LC_NAME=”lzh_TW”
#LC_ADDRESS=”lzh_TW”
#LC_TELEPHONE=”lzh_TW”
#LC_MEASUREMENT=”lzh_TW”
#LC_IDENTIFICATION=”lzh_TW”
LANGUAGE=en_US.UTF-8

改回繁體中文 zh_TW

1
2
3
4
sudo locale-gen zh_TW 
sudo locale-gen zh_TW.UTF-8
sudo dpkg-reconfigure locales
sudo update-locale LANG="zh_TW.UTF-8" LANGUAGE="zh_TW"

改完重新登入後才有效果