![]() | ![]() |
Home |
|
|
Configuring Adaptive Server Enterprise for UNIX Platforms |
|
| Chapter 7: Localization |
This chapter provides background information about Sybase's localization support as well as task information for reconfiguring character sets, sort orders, and language modules.
Topics covered include:
Adaptive Server offers localization support for international customers and customers with heterogeneous environments. Localization is the process of setting up an application to run in a particular language environment.
Sybase provides the following localization support:
By default, Adaptive Server and Backup Server have the following:
In heterogeneous environments, Adaptive Server and Backup Server may need to communicate with other servers or applications running on a platform that has a different default character set. You can prevent data translation delays by installing the other platform's default character set as the default for Adaptive Server and Backup Server.
Alternatively, you can install additional character sets in Adaptive Server to allow Adaptive Server to translate data from servers and clients that use other character sets. See the System Administration Guide for character set conversion paths.
Adaptive Server includes character set definition files (charset.loc files) in the Sybase installation directory for each character set under charsets. These files permit you to configure your system for optimum server-client and server-server communication.
For a more detailed explanation of localization files, see "Localization Files".
See Appendix C, "Character Sets, Sort Orders, and Message Language," for a list of available character sets.
You can select a sort order (collating sequence) for your data according to your facility's needs. Your Sybase software includes sort order definition files (.srt files) under the charsets directory.
WARNING! If possible, make all changes to the character set and sort order for a new Adaptive Server before creating any user databases or making any changes to the Sybase-supplied databases. Changing the character set and sort order after data or data structures have been added to Adaptive Server can cause difficulties. If you need to change the character set or sort order after you have added data, see the System Administration Guide.
Available sort orders vary according to the character sets installed on Adaptive Server. To determine available sort orders, review the sort order= field of the charset.loc file in $SYBASE/charsets/charset_name for each character set you plan to install.
See "Localization Files" for a more detailed explanation of localization files.
See Appendix C, "Character Sets, Sort Orders, and Message Language," for a list of available sort orders.
If you want Adaptive Server error messages to be displayed in a language other than U.S. English, you must purchase and install the appropriate Language Module.
Language Module features are located in the Sybase installation directory ($SYBASE) under the locales and charsets subdirectories.
The language, character set, and sort order files to support a new language are automatically loaded into the Sybase installation directory when a Language Module is installed.
Figure 7-1 illustrates the structure of the localization files. This figure does not show a complete listing of all the files.
Figure 7-1: Localization files in the Sybase installation directory 
The $SYBASE/locales directory contains a subdirectory for each available language. Each language subdirectory contains a subdirectory for each character set available with that language. The files (.loc files) in these subdirectories enable Adaptive Server or Backup Server to report errors in a specific language encoded in a specific character set. There are a variety of .loc files in each subdirectory. Most of these files contain translated error messages for a specific product or utility. The common.loc file in each subdirectory contains localized information used by all products, such as local date, time, and money formatting.
The $SYBASE/locales directory contains the locales.dat file, which is used to convert platform-specific international locale information to Sybase proprietary format. This file contains entries that associate platform-specific locale names with Sybase language and character set combinations.
Files in the $SYBASE/charsets/charset_name directory contain information related to particular character sets, such as the definition of the character set and any sort orders available for that character set.
A client cannot connect with Adaptive Server if the server does not support the client's language or character set.
When a localized client application connects to Adaptive Server, the server checks to see if it supports the client's language and character set. If it does, then it automatically handles all character set conversion and displays Adaptive Server messages in the client's language and character set.
Backup Server returns messages to Adaptive Server in the client's language and Adaptive Server's character set. Adaptive Server then converts the messages and issues them in the client's language and character set.
If Adaptive Server or Backup Server does not support a client's language or character set, a warning message is displayed. Errors also occur if the Backup Server character set is not compatible with the Adaptive Server character set.
WARNING! Single-byte and multibyte character sets are incompatible. To avoid conversion problems, configure Adaptive Server and Backup Server with the same type of character set.
See the System Administration Guide for detailed information about supported conversion paths.
If you are installing new Language Modules, perform the following steps:
By default, svrbuild configures Adaptive Server and Backup Server with the U.S. English language, the default character set for your platform, and binary sort order.
During the Adaptive Server installation process, you can specify a different language, character set, or sort order.
To change the language, character set, or sort order for an existing Adaptive Server or Backup Server, follow these steps:
$SYBASE/bin/sqllocsqlloc displays a list of servers, both active and inactive, that exist on your machine.
You can edit the locales.dat file, after you have installed a new Language Module or when you reconfigure language or character set options for Adaptive Server or Backup Server.
Client applications use the locales.dat file to identify the language and the character to use. When a client application starts, it checks the operating system locale setting, and then checks the locales.dat file to see if that setting is appropriate for Adaptive Server. A locale entry for French would look like the following:
locale = french, french, iso_1
When the client connects to Adaptive Server, the language and character set information is passed to Adaptive Server. Adaptive Server then:
For example, using the locale entry above, Adaptive Server first checks the locales directory for a french language subdirectory; then it verifies that the messages file exists in the iso_1 character set subdirectory.
In Adaptive Server, the locales.dat file is used by applications such as isql. Before using an application, verify that the locales.dat file on Adaptive Server has a valid entry if:
Each entry in the locales.dat file links a platform-specific locale definition to a Sybase language and character set combination. Each entry has the following format:
locale = platform_locale, syb_language, syb_charset
Table 7-1 provides a description of the locales.dat parameters.
Parameter | Description |
|---|---|
platform_locale | Platform-specific keyword for a locale. See your operating system manual for appropriate values. When the locale being defined is the default for the site, the platform_locale is "default." |
syb_language | Name of the language directory to be used ($SYBASE/locales/language_name) |
syb_charset | Character set name used for determining character set conversion and to identify the directory location of the message files. ($SYBASE/locales/language_name/charset_name) |
For example, the following entry defines the default locale as U.S. English with the iso_1 character set:
locale = default, us_english, iso_1
Adaptive Server software comes with some locale entries already defined in the locales.dat file. If these entries do not meet your needs, you can either modify them or add new locale entries.
To edit the locales.dat file:
For example, if you want your Adaptive Server messages to appear in French, Adaptive Server must use the Roman 8 character set. Check the locales.dat entries for the your operating system and look for the following entry:
locale = french, french, roman8
|
|