Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2026078
  • 博文数量: 433
  • 博客积分: 918
  • 博客等级: 准尉
  • 技术积分: 3218
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 18:21
个人简介

你是不是暗恋我,那就给我发个消息呀,让我知道o(∩∩)o

文章分类

全部博文(433)

分类: LINUX

2014-02-06 14:16:30

查看当前系统语言环境
locale
编辑配置文件,将zh_US.UTF-8改为en_US.UTF-8,zh改为en
sudo nano /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
修改后立即生效:
source /etc/default/locale 
继续查看更改后的系统语言变量,如果出现下列错误,说明没安装en_US的local
@ubuntu:~$ 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
@ubuntu:~$ 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 安装en_US.UTF-8
@ubuntu:~$ cd /usr/share/locales
@ubuntu:/usr/share/locales$ ls
install-language-pack  remove-language-pack
@ubuntu:/usr/share/locales$ sudo ./install-language-pack en_US
Generating locales...
  en_US.UTF-8... done
Generation complete.
dpkg-trigger: dpkg-trigger must be called from a maintainer script (or with a --by-package option)
查看,应该一切正常了。
@ubuntu:/usr/share/locales$ locale
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=

                                   
阅读(4317) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~