Oracle9i Globalization Support Guide Release 1 (9.0.1) Part Number A90236-02 |
|
This chapter provides an overview of Oracle Globalization Support. It includes the following topics:
Oracle's Globalization Support architecture allows you to store, process, and retrieve data in native languages. It ensures that database utilities, error messages, sort order, date, time, monetary, numeric, and calendar conventions automatically adapt to any native language and locale. In the past, Oracle's Globalization Support capabilities were referred to as National Language Support (NLS) features. National Language Support is a subset of Globalization Support because the Oracle database can do more than handle one national language or store data in one character set. Globalization Support allows you to develop multilingual applications and software products that can be accessed and run from anywhere in the world simultaneously without modification. The applications can render content in native users' languages and locale preferences.
Oracle's Globalization Support architecture is implemented with the Oracle NLS Runtime Library (NLSRTL). The NLS Runtime library provides a comprehensive suite of language-independent functions that allow proper text and character processing and language convention manipulations. Behavior of these functions for a specific language and territory is governed by a set of locale-specific data identified and loaded at runtime.
Figure 1-1 illustrates loading locale-specific data at runtime. For example, French and Japanese locale data are loaded.
The locale-specific data is stored in a directory specified by the ORA_NLS*
environment variable. For each new release of the Oracle database, there is a different ORA_NLS
data directory. For Oracle9i, the ORA_NLS33
directory is used. For example, on most UNIX platforms, the ORA_NLS33
environment variable should be set to $ORACLE_HOME/ocommon/nls/admin/data
. On Win32 platforms, use the default that is set by the installer if the ORACLE_HOME
directory contains just one release of Oracle.
Release |
Environment Variable |
7.2 |
|
7.3 |
|
8.0, 8.1, 9.0.1 |
|
If your system is running in a multi-version Oracle environment, you must ensure that the appropriate ORA_NLS*
variable (for example, ORA_NLS33
) is set and that the corresponding NLS datafiles for that release are available.
A boot file is used to determine the availability of the NLS objects that can be loaded. Oracle supports both system and user boot files. The user boot file gives you the flexibility to tailor what NLS locale objects will be available for the database, thus helping you control memory consumption. Also, new locale data can be added and some locale data components can be customized.
The Oracle9i database is implemented using a multitier architecture. The language-dependent operations are controlled by several parameters and environment variables on both the client and the database server. On the database server, each session started on behalf of a client may run in the same or a different locale, and have the same or different language requirements specified.
A database itself also has a set of session-independent NLS parameters specified at its creation time. Two of the parameters specify the database character set and the national (Unicode) character set. The parameters specify the character set used to store text data in the database. Other parameters, like language and territory, are used to evaluate CHECK
constraints.
If the client session and the database server specify different character sets, the Oracle9i database converts character set strings automatically.
From a Globalization Support perspective, all applications, even those running on the same physical machine as the Oracle instance, are considered clients. For example, when SQL*Plus is started by the Unix user who owns the Oracle software from the Oracle home in which the RDBMS software is installed, and SQL*Plus connects to the database through an adapter by specifying the ORACLE_SID, SQL*Plus
is considered a client and its behavior is ruled by client-side NLS parameters. Another example is when the middle tier is an application server and the different sessions spawned by it are considered to be separate client sessions.
When a client application is started, it initializes its client NLS environment from environment settings. All NLS operations performed locally are executed using these settings. Examples of local NLS operations are display formatting (using item format masks) in Oracle Developer applications or user OCI code executing NLS OCI functions with OCI environment handles.
When the application connects to a database, a session is created on the server. The new session initializes its NLS environment from NLS instance parameters specified in the initialization parameter file. These settings can be subsequently changed by an ALTER
SESSION
statement. The statement changes only the session NLS environment. It does not change the local client NLS environment. The session NLS settings are used to process SQL and PL/SQL statements that are executed on the server.
Immediately after the connection, if the NLS_LANG
environment setting is defined on the client side, an implicit ALTER SESSION
statement synchronizes the client and the session NLS environments.
Unicode is a universal encoded character set that allows you to store information from any language using a single character set. Unicode provides a unique code value for every character, regardless of the platform, program, or language.
Incorporating Unicode into client-server or multitiered applications and websites offers significant cost savings over the use of legacy character sets. Unicode enables a single software product or a single website to be targeted across multiple platforms, languages, and countries without re-engineering. It also allows data to be transported through many different systems without corruption.
Oracle's standard features include
The Oracle9i database allows you to store, process, and retrieve data in native languages. The languages that can be stored in an Oracle9i database are all languages written in scripts that are encoded by Oracle-supported character sets. Through the use of Unicode databases and datatypes, Oracle9i supports most contemporary languages.
Additional support is available for a subset of the languages. The Oracle9i database knows, for example, how to display dates using translated month names or how to sort text data according to cultural conventions.
When this manual uses the term language support, it refers to the additional language-dependent functionality, not to the ability to store text of the given language.
For some of the supported languages, Oracle provides translated error messages and a translated user interface of the database utilities.
See Also:
|
The Oracle9i database supports cultural conventions that are specific to geographical locations. The default local time format, date format, numeric and monetary conventions depend on the local territory setting. By setting different NLS parameters, the database session can use different cultural settings. For example, you can set British pound sterling (GBP) as the primary currency and the Japanese yen (JPY) as the secondary currency for a given database session even when the territory is defined as AMERICA
.
Different conventions for displaying the hour, day, month, and year can be handled in local formats. For example, in the United Kingdom, the date is displayed using the DD-MON-YYYY
format, while Japan commonly uses the YYYY-MON-DD
format.
Time zones and daylight saving support are also available.
Currency, credit, and debit symbols can be represented in local formats. Radix symbols and thousands separators can be defined by locales. For example, in the US, the decimal point is a dot (.), while it is a comma (,) in France. Therefore, the amount $1,234 has different meanings in different countries.
Many different calendar systems are in use around the world. Oracle supports seven different calendar systems: Gregorian, Japanese Imperial, ROC Official (Republic of China), Thai Buddha, Persian, English Hijrah, and Arabic Hijrah.
Oracle9i provides linguistic definitions for culturally accurate sorting and case conversion. Some of the definitions have two versions. The basic definition treats strings as sequences of independent characters. The extended definition recognizes pairs of characters that should be treated as special cases.
Strings that are converted to upper case or lower case using the basic definition always retain their lengths. Strings converted using the extended definition may get longer or shorter.
Oracle supports a large number of single-byte, multibyte, and fixed-width encoding schemes that are based on national, international, and vendor-specific standards.
You can customize locale data and calendar settings.
Oracle allows you to customize all locale data such as language, character set, territory, or linguistic sort using the Oracle Locale Builder.
You can define ruler eras for imperial calendars and deviation days for lunar calendars.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|