The Solaris 8 operating environment builds inherent internationalization features into every localized product. Sun's system localization for the Simplified Chinese Solaris 8 operating environment incorporates the following essential environmental elements on top of internationalization:
A locale includes the specification of a language, territory, code set, and other features. The Simplified Chinese Solaris operating environment includes the following locales:
C
- ASCII
English environment
zh
-
Simplified Chinese environment in EUC
zh.GBK
-
Simplified Chinese environment in GBK, an extension of GB2312-80
zh.UTF-8
-
Simplified Chinese environment in Unicode 3.0.
A category is a set of language and cultural environment dependent features, defined by ANSI C, whose behavior depends on the locale.
For example, the Simplified Chinese locale and the English/ASCII locale each have a category that defines how time and dates are displayed according to the cultural norm, and the actual Simplified Chinese or English/ASCII characters for time and date. The categories are listed in "Locale Categories ".
The Simplified Chinese Solaris operating environment localization facilities support the ANSI C recommendations for internationalization and localization. The ANSI C recommendations define a user's locale and the categories within each locale.
Three components make up the Simplified Chinese Solaris localization facility:
Localization interface--User-level shell environment variables set the current working locale for each category. The application-level setlocale() function sets the locale for each category.
Localization objects--These objects hold information suitable for functions that are specific to a locale.
Localization support features--These features include appropriate supporting commands and functions as well as facilities for creation, addition, and maintenance of localization objects.
The Simplified Chinese Solaris 8 operating environment defines six categories to describe the local environment. These categories allow the localization of character typing and conversion functions, date and time, numeric representation, monetary format, collation order, and program messages. Each category can have multiple localizations. For example, date and time can be displayed in C locale format or Simplified Chinese. Applications can switch between locale settings by using the setlocale() function.
Users can change their locale settings with shell environment variables. Each category names an existing locale. The setlocale function directly sets or queries the setting of these categories. Internationalized functions use these settings to access the appropriate tables for the desired locale.
Environment variables can be used to set the categories indirectly: when setlocale() sets the categories to the default setting for that application, it uses the setting of each environment variable to set the associated categories. The setlocale() function used in this way does not change the settings of environment variables, it only reads their settings.
The Simplified Chinese Solaris 8 operating environment allows you to set the Chinese environment or use the English environment. You can specify the following:
General locale setting--for all locale-related aspects of the environment.
Specific locale category settings--for particular aspects of the environment.
The general locale setting is LC_ALL. The specific locale category settings are listed below. In this book, the designation LC_XXX refers to any one of the locale category settings.
The specific locale category settings are:
LC_CTYPE
LC_TIME
LC_NUMERIC
LC_MONETARY
LC_COLLATE
LC_MESSAGES
The LC_ALL identifier invokes all of the categories.
The Simplified Chinese Solaris 8 operating environment supports terminals using GB2312 code. The terminals must have a method to input Simplified Chinese characters, that is, run their own Simplified Chinese input conversion.
For information on using different types of terminals, refer to Simplified Chinese Solaris System Administrator's Guide and International Language Environments Guide.