Traditional Chinese Solaris User's Guide

Chapter 7 Configuring a Traditional Chinese Solaris System

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 Traditional Chinese Solaris operating system. This chapter includes the following sections.

Setting the Default Locale

This section describes methods to set the default locale.

How to Set a System-Wide Default Locale

  1. Become superuser.

  2. In 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: C, zh_TW, zh_TW.BIG5, zh_TW.UTF-8, zh_HK.BIG5HK, zh_HK.UTF-8

  3. Instruct all users to exit CDE.

  4. Kill the dtconfig process.


    # /usr/dt/bin/dtconfig -kill
    
  5. Reboot the system.


    # reboot
    

Using Aliases to Set the Locale

You can use aliases to change locales in a terminal window without typing long commands or editing your .dtlogin file and running source every time.

How to Set Up Locale Aliases for the Korn Shell

    Put aliases such as the following in your .profile file.


    alias twn_EUC "export LANG=zh_TW; /bin/stty cs8 -istrip defeucw"
    alias twn_BIG5 "export LANG=zh_TW.BIG5; /bin/stty cs8 -istrip \defeucw"
    alias asc "export LANG=C; /bin/stty cs7 istrip defeucw"
    alias twn_UTF-8 "export LANG=zh_TW.UTF-8; /bin/stty cs8 -istrip defeucw"

How to Set Up Locale Aliases for the C Shell

    Put aliases like the following in your .cshrc file.


    alias twn_EUC "setenv LANG zh_TW; /bin/stty cs8 -istrip defeucw"
    alias twn_BIG5 "setenv LANG zh_TW.BIG5; /bin/stty cs8 -istrip \defeucw"
    alias asc "setenv LANG C; /bin/stty cs7 istrip defeucw"
    alias twn_UTF-8 "setenv LANG=zh_TW.UTF-8; /bin/stty cs8 -istrip defeucw"