You can use the procedures this chapter to set a system-wide default locale or to add a new locale from the Solaris DVD and CD media. You also change the font path set by the Xsession script included in the Simplified Chinese Solaris Operating System. The following sections are included in this chapter.
You can make a system-wide change to the default locale with the following procedure.
Become superuser.
Edit the /etc/default/init file.
Add or update the LANG variable with the appropriate locale.
LANG=locale |
You can set the LANG variable with one of the following locales: zh, zh.GBK, zh_CN.GB18030, zh.UTF-8
Instruct all users to exit CDE.
Kill the dtconfig process.
# /usr/dt/bin/dtconfig -kill |
Reboot the system.
# reboot |
You can use aliases to change locales in a terminal window without typing long command lines or editing your .dtlogin file and running source every time.
Put aliases such as the following in your .profile file.
alias chn "export LANG=zh; /bin/stty cs8 -istrip defeucw" alias chn_GBK "export LANG=zh.GBK; /bin/stty cs8 -istrip \defeucw" alias asc "export LANG=C; /bin/stty cs7 istrip defeucw" alias chn "export LANG=zh; /bin/stty cs8 -istrip defeucw" |
Put aliases such as the following in your .cshrc file.
alias chn_EUC "setenv LANG zh; /bin/stty cs8 -istrip defeucw" alias chn_GBK "setenv LANG zh.GBK; /bin/stty cs8 -istrip \defeucw" alias asc "setenv LANG C; /bin/stty cs7 istrip defeucw" alias chn_UTF-8 "setenv LANG=zh.UTF-8; /bin/stty cs8 -istrip defeucw" |