LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 705|回复: 5

新装的系统,locale有问题

[复制链接]
发表于 2006-6-7 22:35:36 | 显示全部楼层 |阅读模式
[PHP]
gentoo etc # locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
de_DE
de_DE@euro
en_HK
en_PH
en_US
en_US.utf8
es_MX
fa_IR
fr_FR
fr_FR@euro
it_IT
ja_JP
ja_JP.eucjp
ja_JP.utf8
POSIX
[/PHP]

没有中文的locale啊,我的软件大部分界面都是英文的,怎么添加新的locale呢?是不是还要重新编译glibc?
发表于 2006-6-7 23:29:20 | 显示全部楼层
好像从glibc 2.4开始有了locale-gen
不需要重编glibc了
$ cat /etc/locale.gen
#  etc locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in  usr share i18n locales  and
# where <charmap> is a charmap located in  usr share i18n charmaps .
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
#  usr share i18n SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.

en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB2312
zh_CN.GBK GBK
zh_CN.GB18030 GB18030
zh_CN.UTF-8 UTF-8
zh_HK BIG5-HKSCS
zh_HK.UTF-8 UTF-8
zh_TW BIG5
zh_TW.UTF-8 UTF-8
回复 支持 反对

使用道具 举报

发表于 2006-6-8 01:11:24 | 显示全部楼层
公社的gentoo板块有篇精华帖子,叫什么最精简的locale,是好帖。楼上的办法不是很清楚啊。但是编译glibc的时候,确实有一段话,叫我拷贝什么什么文件的。没找着做。
回复 支持 反对

使用道具 举报

发表于 2006-6-8 01:31:33 | 显示全部楼层
这是glibc的Changelog里面的
  17 Apr 2006; Mike Frysinger <vapier@gentoo.org> glibc-2.4-r2.ebuild:
  Kill USE=userlocales and replace with Debian locale-gen #22565.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-8 06:35:23 | 显示全部楼层
差不多明白了,不过我编译的glibc为什么只有那几个locale呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-8 06:43:24 | 显示全部楼层
又有了一个新的小问题了,
我在gdm中选择的语言不起作用,登录以后仍然是和用户当前设置的locale一致。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表