出处:http://bbs.chinaunix.net/viewthread.php?tid=357335&extra=&page=1
http://topic.csdn.net/t/20050713/20/4142769.html
LANG是语言环境,不过这个变量的等级最低,改变别的环境变量可以使之失效。
LC_CTYPE是表明字符分类应该使用哪个locale的资料,正是一个locale最基本的要素,通常和该locale使用的编码有关,要使用中文locale的话,一定要设置这个变量。
LC_NUMERIC,LC_TIME,LC_COLLATE,LC_MONETARY分别表示数字,时间,排序和货币单位使用哪个locale的资料,LC_MESSAGE表示应该使用哪个locale的信息作为输出,对于中文用户,如果你想看中文界面的话,最好还是设成中文的。
IXDBA.NET社区论坛
LC_ALL是表示上面所有的资料,只要设置了LC_ALL为某个特定的变量,其它的会自动跟着变过来。
还有一个LANGUAGE的环境变量,设置它之后,LC_MESSAGES就失效了,LANGUAGE比LC_MESSAGES酷的是,你可以通过设置LANGUAGE来使用多个locale,比如:
export LANGUAGE=de:fr:en
locale -a 可以显示所有支持的语言,好象没有zh.GB2312, 应该是zh_CN.GB2312
Solaris 8 的CD上的内容:
Software 1 of 2 :
contains most of core/essential localization packages.
Software 2 of 2 :
also contains some localization packages.
Languages :
provides message translations (user interface and documentation) for 9 full locales: French, German, Italian, Spanish, Swedish, Japanese, Korean, Simplified Chinese, and Traditional Chinese. It also includes some additional software as BCP support, optional fonts, and locale-specific utilities.
solaris 中每一种语言有几个不同的locale可以选择使用。
locale 有两种:Partial locale Full locale
前者,可以在特定的locale执行程序,不过显示的信息是英文的,所以就是部分locale。
Full locale,全部显示的都是你特定选择的区域语言。
只安装software 的盘,就会出现前者的情况。
语言包的三种安装方式
1 初始化的时候就安装,这个最省事
2 upgrade OS的时候,大家都知道upgrade比re-install时间都长
3 手工加载,需要知道确切的都有哪些packages是需要的。
Shell Script to check Zh Lang packages then install them:
Insert software CD 1 and 2:
# csh
# mkdir /opt/sun/ALE1
# cd /cdrom/cdrom0/s0/Solaris_8/Product
# foreach i (`pkginfo -d . | grep ALE | grep "Simplified Chinese" |nawk '{print $2}'`)
cp -r $i /opt/sun/ALE1
end
# cd /opt/sun/ALE1
# pkgadd -d .
eject the CD 1/2 and then insert the CD 2/2:
# csh
# mkdir /opt/sun/ALE2
# cd /cdrom/cdrom0/Solaris_8/Product
# foreach i (`pkginfo -d . | grep ALE| grep "Simplified Chinese" |nawk '{print $2}'`)
cp -r $i /opt/sun/ALE2
end
# cd /opt/sun/ALE2
# pkgadd -d .
(CD2 上面什么都没有 )
Eject the CD 2 then Insert Language Environment CD;
# csh
# mkdir /opt/sun/ALE3
# cd
/cdrom/sol_8_1001_lang_sparc/components/SimplifiedChinese/sparc/Packages
# foreach i (`pkginfo -d . | grep ALE |grep "Simplified Chinese"| nawk '{print $2}'`)
cp -r $i /opt/sun/ALE3
end
# cd /opt/sun/ALE3; pkgadd -d .