如何为计算机设置全局语言环境?
我最近用英语安装了Kubuntu 14.04LTS,但是由于我在西班牙,所以我选择西班牙作为一个国家,然后更改了语言环境选项,以便获得所有国家/地区特定的配置,例如数字分组,小数点分隔符,日期格式等。我也添加了西班牙语。
现在,所有应用程序都抱怨语言环境错误。check-language-support
告诉我我正在使用en_ES.UTF-8
系统的语言环境,而该语言环境确实是错误的,西班牙没有英语语言环境。
我尝试使用Kubuntu的国家/地区和语言设置,但不能解决问题。我尝试使用export LANG=en_GB.UTF-8
和export LC_ALL=en_GB.UTF-8
然后使用,sudo dpkg-reconfigure locales
这导致check-language-support
我现在拥有正确的配置,但如果是,则仅在该konsole会话中。此问题还阻止konsole显示unicode字符,并且我无法使用死键或输入任何“国际字符”,例如ñ或ç(我在Firefox等其他应用程序上使用的那些字符,我正在使用它来发布此问题)。
因此,问题是:如何为计算机设置全局语言环境?
这不是错误报告,如果无法修复,最终可能会重新安装计算机。但是我真的很想知道如何执行这个非常基本的任务。
谢谢。
$ check-language-support
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en:es:en",
LC_ALL = (unset),
LC_PAPER = "en_ES.UTF-8",
LC_ADDRESS = "en_ES.UTF-8",
LC_MONETARY = "en_ES.UTF-8",
LC_NUMERIC = "en_ES.UTF-8",
LC_TELEPHONE = "en_ES.UTF-8",
LC_IDENTIFICATION = "en_ES.UTF-8",
LC_MEASUREMENT = "en_ES.UTF-8",
LC_TIME = "en_ES.UTF-8",
LC_NAME = "en_ES.UTF-8",
LANG = "en_ES.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_COLLATE to default locale: No such file or directory
hunspell-en-ca libreoffice-help-en-gb libreoffice-l10n-en-gb libreoffice-l10n-en-za mythes-en-au wspanish
$ cat /etc/default/locale
LANG="en_US.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
$ 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_ES.UTF-8
LANGUAGE=en:es:en
LC_CTYPE="en_ES.UTF-8"
LC_NUMERIC=en_ES.UTF-8
LC_TIME=en_ES.UTF-8
LC_COLLATE="en_ES.UTF-8"
LC_MONETARY=en_ES.UTF-8
LC_MESSAGES="en_ES.UTF-8"
LC_PAPER=en_ES.UTF-8
LC_NAME=en_ES.UTF-8
LC_ADDRESS=en_ES.UTF-8
LC_TELEPHONE=en_ES.UTF-8
LC_MEASUREMENT=en_ES.UTF-8
LC_IDENTIFICATION=en_ES.UTF-8
LC_ALL=
$ update-locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en:es:en",
LC_ALL = (unset),
LC_PAPER = "en_ES.UTF-8",
LC_ADDRESS = "en_ES.UTF-8",
LC_MONETARY = "en_ES.UTF-8",
LC_NUMERIC = "en_ES.UTF-8",
LC_TELEPHONE = "en_ES.UTF-8",
LC_IDENTIFICATION = "en_ES.UTF-8",
LC_MEASUREMENT = "en_ES.UTF-8",
LC_TIME = "en_ES.UTF-8",
LC_NAME = "en_ES.UTF-8",
LANG = "en_ES.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
dpkg-reconfigure locales
生成了英语和西班牙语的所有可能组合。对于所有已安装的语言组合,似乎都调用locale-gen。我还呼吁locale-gen
提供几种语言环境,以防万一。问题是,en_ES不存在