Language Support   «Prev  Next»

Lesson 3The NLS_LANG Parameter
ObjectiveSelect a runtime environment for Oracle

NLS_LANG Parameter

A user can set a language environment for his or her own runtime environment through the use of the NLS_LANG parameter.

Component of NLS_LANG

There are three components of the NLS_LANG parameter:
  1. Language determines the language used by Oracle for error messages, day names, and month names.
  2. Territory determines the local conventions, such as date formats and currency symbols.
  3. Charset indicates the actual character set used by the client.

The language and territory portions of the parameter are optional. If a language or territory is not specified, these portions default to American. However, if you have a language setting, you must also have a territory setting and separate the two with an underscore. The territory value is separated from the charset value by a period.


If you wanted to set NLS_LANG to support Canadian French, you would use the string

Setting NLS_LANG

You set the NLS_LANG parameter as an environment variable for your particular operating system. If you do not specify a value for the NLS_LANG parameter, Oracle will use the default value for language and territory for the database you are using, which are specified in the initialization file for that database with the parameters NLS_LANGUAGE and NLS_TERRITORY, respectively.
You can change the value for the NLS_LANGUAGE or the NLS_TERRITORY parameters at any time in a session with the ALTER SESSION command.
You have learned some of the important national language parameters, but additional parameters are worth mentioning.
In the next lesson, you will learn about character sets, which determine how data is stored and interpreted in the Oracle database.

National Language Support - Quiz

Click the Quiz link below to test your knowledge of national language support.
National Language Support - Quiz