This section describes the steps required to set up the Simplified Chinese environment and to start Simplified Chinese Solaris operation.
Each user's environment variables and ~/.cshrc (in other words, $HOME
/.cshrc) file command lines must be set as described in this section to use Simplified Chinese text. You must make sure the following three .cshrc file features (and consequently the users' C shells) are set correctly before any user starts up the Simplified Chinese OpenWindows environment.
The following three conditions are prerequisites to using Simplified Chinese:
OPENWINHOME
shell variable set to the path to /usr/openwin
LANG
shell-environment language-locale variable set for Simplified Chinese
TTY
mode set appropriately for Simplified Chinese character codes
To set these features, make sure each user's .cshrc file includes the following lines:
setenv LANG zh setenv OPENWINHOME /usr/openwin set path=( /usr/SUNWale/bin $OPENWINHOME/bin $path ) ... if ($?USER != 0 && $?prompt != 0) then /bin/stty cs8 -istrip defeucw endif |
Only /bin/stty can set the required features. Do not use /usr/ucb/stty because it does not set all required features.
Also, make sure each .cshrc file puts $OPENWINHOME/bin
in the user's path before any other OpenWindows file. One way to ensure this is to put the following line in after other path assignments:
set path=(/usr/SUNWale/bin $OPENWINHOME/bin $path) |
The htt input server must be running before any application that uses Simplified Chinese input can run. It is started at OpenWindows startup from each user's home directory .openwin-init file. This file must contain the line:
toolwait $OPENWINHOME/bin/htt |
This line must be ahead of the lines that start Simplified Chinese Solaris applications because they depend on the htt input server for Simplified Chinese operation. If .openwin-init is missing from the home directory, htt is started from the $OPENWINHOME/lib/locale/zh/openwin-init file distributed with the Simplified Chinese Solaris operating environment. The htt(1) man page explains more about the operation of htt.
The .OWdefaults file in the user's home directory specifies the language used for several Solaris features: display language, numbers, time/date, messages, and other basic Simplified Chinese OpenWindows properties. Some other entries in .OWdefaults affect the behavior and appearance of the user's OpenWindows user interface.
Each user's .OWdefaults file should contain the following five lines before running the Simplified Chinese OpenWindows environment. So add these five lines at the end of users' existing .OWdefaults files. (Refer to the "Using Localization on the Workspace Properties Worksheet" section in Simplified Chinese Solaris User's Guide.)
OpenWindows.BasicLocale: |
zh |
OpenWindows.DisplayLang: |
zh |
OpenWindows.InputLang: |
zh |
OpenWindows.TimeFormat: |
zh |
OpenWindows.NumericFormat: |
zh |
These fields can be set to zh, for Simplified Chinese, or C, for English/ASCII operation. These five Simplified Chinese OpenWindows variables have the following properties:
Table A-1 Properties Set in .OWdefaults File
Property |
Description |
---|---|
BasicLocale |
Specifies the country (locale) of the user interface. With the basic locale set, a user can set other specific settings, such as input language. |
DisplayLang |
Specifies the language for labels, messages, menu items, help text, and other displays. |
InputLang |
Specifies the language used for keyboard input. |
TimeFormat |
Specifies the representation format of the time and date. |
NumericFormat |
Specifies the character system for number input/display. |
These five fields can be added to an .OWdefaults file by using the localization category (Locale) in the Workspace Properties worksheet as described in the "Using Localization on the Workspace Properties Worksheet" section in Simplified Chinese Solaris User's Guide.
If you want to maintain your own .xinitrc, update it according to $OPENWINHOME/lib/Xinitrc.
Two directories for applications defaults are part of the Simplified Chinese OpenWindows environment. One is for system-wide defaults, and one is specific to locale features:
The $OPENWINHOME/lib/app-defaults/C directory stores system wide application defaults. These values are for the C
locale.
The $OPENWINHOME/lib/locale/zh/app-defaults directory stores application defaults that are specific to the zh
locale.
The $OPENWINHOME/lib/locale/zh/app-defaults/Htt file has all htt resource default values that depend on the locale.
The $OPENWINHOME/lib/locale/zh/app-defaults/Olwm file lists all olwm window manager resources default values that depend on the locale. Such resource file names have the locale name suffixed to the resource name, for example ButtonFont.zh. When a resource named with the locale suffix is lacking, the resource named without the suffix is used.