Ubuntu修改系统语言为英文可支持中文
Posted crxis
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu修改系统语言为英文可支持中文相关的知识,希望对你有一定的参考价值。
简单来说,就行修改/etc/default/locale
文件,设置语言位UTF-8,如果没有这个语言,就执行命令locale-gen en_US.UTF-8
进行安装,没有即时生效的话就重启。
查看当前系统语言
locale
修改系统语言
例如修改语言为英文
vi /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
重启后,再次查看系统语言
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=en_US.UTF-8
LANGUAGE=en_US:en
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=
查看系统内安装的locale
locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX
zh_CN.utf8
zh_SG.utf8
没装en_US.UTF-8
locale-gen en_US.UTF-8
再次查看
LANG=en_US.UTF-8
LANGUAGE=en_US:en
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=
以上是关于Ubuntu修改系统语言为英文可支持中文的主要内容,如果未能解决你的问题,请参考以下文章