Asian Application Developer's Guide
只搜寻这本书
以 PDF 格式下载本书 (354 KB)

Chapter 1 System Environment

Asian Solaris software enables you to set the Korean or Chinese environment or use the English environment:

  • A general locale setting for all locale-related aspects of the environment, or

  • A specific locale category setting for a particular aspect of the environment

The general locale setting is called LC_ALL. The specific locale category settings each have a name that begins with LC_ but ends with a different suffix depending on the category. The designation LC_XXX refers to any one of the locale category names.

Asian Solaris Operating Environment Locales

The Asian Solaris products include the following locales, the English UTF-8 locale, and a number of partial locales (partial locales are locales that do not contain translated messages). For more information, see Solaris Internationalization Guide for Developers.

  • Korean Solaris includes:

    • ko - the Korean environment in EUC (KS C 5601).

    • ko.UTF-8 - the Korean environment in Universal Multiple-Octet Coded Character Set (UCS) Transmission Format (KS C 5700). This encoding does not support the OpenWindows environment.

  • Simplified Chinese Solaris includes zh - the Simplified Chinese environment in EUC

  • Traditional Chinese Solaris includes:

    • zh_TW - the Simplified Chinese environment in EUC.

    • zh_TW.BIG5 - the Traditional Chinese environment in Big5. This encoding does not support the OpenWindows environment.

Typically, an application uses the value of the LANG environment variable to set each category that has not previously been set explicitly using LC_XXX. In the Korean or Chinese Solaris environments, the value of the LANG environment variable is as follows:

  • ko and ko.UTF-8 for Korean

  • zh for Simplified Chinese

  • zh_TW and zh_TW.BIG5 for Traditional Chinese

  • C for the English locale

  • en_US.UTF-8 the locale that handles multiple scripts simultaneously


Note -

All Asian applications must be internationalized. For details on this process, see Solaris Internationalization Guide for Developers.


Asian Locale Files

Korean and Chinese locale-specific files and libraries are located in the following directories:

  • Korean Solaris software:

    • /usr/lib/locale/

    • /usr/openwin/lib/locale/ko/

    • /usr/openwin/lib/locale/ko.UTF-8/

    • /usr/lib/locale/ko

    • /usr/lib/locale/ko.UTF8

  • Simplified Chinese Solaris software: /usr/openwin/lib/locale/zh/

  • Traditional Chinese Solaris software:

    • /usr/openwin/lib/locale/zh_TW/

    • /usr/openwin/lib/locale/zh_TW.BIG5/

CDE Message Files

For details on how window system messages are generated and how to create message files for your own applications, see Common Desktop Environment: Internationalization Programmer's Guide.

Korean Messages

Files in the /usr/dt/lib/nls/msg/ko and /usr/dt/lib/nls/msg/ko.UTF-8 directories with .cat filename extensions contain messages used in Korean CDE.

Simplified Chinese Messages

Files in the /usr/dt/lib/nls/msg/zh/ directory with .cat file name extensions contain messages used in Simplified Chinese CDE.

Traditional Chinese Messages

Files in the /usr/dt/lib/nls/msg/zh_TW/ and /usr/dt/lib/nls/msg/zh_TW.BIG5/ directories with .cat file name extensions contain messages used in Traditional Chinese CDE.

fonts Directory

The /usr/openwin/lib/locale/locale/X11/fonts directory holds the Korean or Chinese fonts (locale is ko, ko.UTF, zh, zh_TW, or zh_TW.BIG5). This directory must be in your font path in order to access Korean or Chinese fonts. (The xsession script that comes with the Asian Solaris operating environment includes this directory in the font path.) To add a different font directory path dynamically, type:


% xset +fp font_directory_path

print Directory

The /usr/dt/config/psfonts/locale/print directory contains locale-specific printing files (locale is ko, ko.UTF-8, zh, zh_TW, or zh_TW.BIG5). Most notable is the prolog.ps file, which is used by the CDE tools that come with the Korean or Chinese Solaris operating environment. For information on using prolog.ps, refer to the printing facilities chapters in the Asian Solaris user's guide appropriate to your Solaris operating environment.

app-defaults Directory

The /usr/dt/app-defaults/locale directory contains locale-specific resource files for CDE applications (locale is ko, ko.UTF-8, zh, zh_TW, or zh_TW.BIG5).

CDE Configuration Directory

The /usr/dt/config/locale directory contains locale-specific resource files for CDE applications (locale is ko, ko.UTF-8, zh, zh_TW, or zh_TW.BIG5).

CDE Action and Data Type Definition Directory

The /usr/dt/appconfig/types/locale directory contains locale-specific action and data type definition files for CDE (locale is ko, ko.UTF-8, zh, zh_TW, or zh_TW.BIG5).