Chinaunix

标题: 如何把locale从当前的:C iso_8859_1 改到 en_US iso_8859_1? [打印本页]

作者: michielchen    时间: 2005-05-22 19:09
标题: 如何把locale从当前的:C iso_8859_1 改到 en_US iso_8859_1?
如题,请高手指点!
作者: gzkaka    时间: 2005-05-22 19:36
标题: 如何把locale从当前的:C iso_8859_1 改到 en_US iso_8859_1?
export LANG=xxxxx
作者: michielchen    时间: 2005-05-22 19:48
标题: 如何把locale从当前的:C iso_8859_1 改到 en_US iso_8859_1?
多谢回复!
我试过了,在export LANG="en_US"之前:
locale -a  的结果如下:
# locale -a
POSIX
C
iso_8859_1
之后仍是:
# locale -a
POSIX
C
iso_8859_1
我希望能看到
# locale -a
POSIX
en_US
iso_8859_1这样的结果,能不能进一步指点指点?多谢!
作者: hjp1973    时间: 2005-05-23 11:52
标题: 如何把locale从当前的:C iso_8859_1 改到 en_US iso_8859_1?
Q3) How do I set a system default locale ?

A3) The system default locale can be set in the /etc/default/init file. -- Example excerpted from /etc/default/init --

# # Lines of this file should be of the form VAR=value, where VAR is one of # TZ, LANG, or any of the LC_* environment variables. LANG=en_US LC_ALL=en_US

The system must be rebooted after modifying the /etc/default/init file in order for the changes to take effect.


Q4) How do I set a user specific locale ?

A4) A locale can be set for a user in their user initialization files such as $HOME/.profile or $HOME/.cshrc (or other shell-specific initialization file). Use the shell-specific syntax for setting any of the variables needed: LANG and LC_*

Examples: sh, ksh - bourne and korn shell syntax: LANG=en_US; export LANG LC_ALL=en_US;export LC_ALL

csh - c shell syntax: setenv LANG en_US setenv LC_ALL en_US




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2