Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 6: Using dscp [Table of Contents] Chapter 8: Installing Online Help and Sample Databases

Configuring Adaptive Server Enterprise for UNIX Platforms

[-] Chapter 7: Localization

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:

Localization Support

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:

Available Character Sets

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.

Available Sort Orders

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.

Language Modules

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.

Localization Files

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
raster

locales 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.

locales.dat File

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.

charsets Directory

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.

Conversions Between Servers and Clients

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.

Installing New Language Modules

If you are installing new Language Modules, perform the following steps:

  1. Prepare your operating system according to the instructions in
    Installing Adaptive Server and OmniConnect on UNIX Platforms. (These preparations are not necessary if you completed them when you installed or upgraded Adaptive Server.)

  2. Load the Language Module software from the distribution media, according to the instructions in Installing Adaptive Server and OmniConnect on UNIX Platforms. You can load this software into the same directory where you loaded Adaptive Server.

  3. Follow the instructions in this chapter to reconfigure languages, character sets, or sort order for Adaptive Server or Backup Server, using the sqlloc utility.

Configuring Localization

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.

Using sqlloc

To change the language, character set, or sort order for an existing Adaptive Server or Backup Server, follow these steps:

  1. Start sqlloc:

    $SYBASE/bin/sqlloc
    sqlloc displays a list of servers, both active and inactive, that exist on your machine.

  2. Select a server from the list. If you select an inactive server, sqlloc will start it for you.

  3. Use the sqlloc online help (click Help) to guide you through the various screens to change the language, character set, or sort order of Adaptive Server or Backup Server.

  4. Exit sqlloc when you are finished.

Editing the locales.dat File

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.

The locales.dat File and Client Applications

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:

The locales.dat File and Adaptive Server

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:

Format of locales.dat File Entries

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.

Table 7-1: 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

Sybase-Defined Locale Entries

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.

How to Edit the locales.dat File

To edit the locales.dat file:

  1. Make a copy of the original, unedited locales.dat file, in case you have problems with the edited version.

  2. Make sure the file contains an entry for the language (syb_language) and character set (syb_charset) combination you want to use. The value for platform_locale must match the value required by your operating system. If locales definitions in your system configuration files do not match the Sybase locale definitions, your applications will not run properly.

    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
  3. If the entry for your locale does not exist, add the required entry or modify an existing entry.

  4. Save the edited file.


Chapter 6: Using dscp [Table of Contents] Chapter 8: Installing Online Help and Sample Databases