Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

$DEFAULT_LANGUAGE

The $DEFAULT_LANGUAGE property specifies that the dimension for which it is an attribute is the language dimension for the analytic workspace in which it is defined, and specifies the default language for a language dimension.

Note:

There can be only one language dimension in an analytic workspace and only that dimension can have a $DEFAULT_LANGUAGE property.

Syntax

Before you add or delete a $DEFAULT_LANGUAGE property to your language dimension, you must make that dimension the most recently defined or considered object (see DEFINE and CONSIDER). You add $DEFAULT_LANGUAGE property using a PROPERTY statement:

Arguments

language

A TEXT expression that is one of the values in your language dimension, or an empty string.

Notes

Working with Language Dimensions

A language dimension is a dimension that has a $DEFAULT_LANGUAGE property defined for it. There can only be one language dimension in an analytic workspace. Working with language dimensions involves:

Creating a Language Dimension To create a language dimension, take the following steps:

  1. Define a TEXT dimension using DEFINE DIMENSION.

  2. Populate the language dimension with the names of the languages you want to support. As language names, use valid values for NLS_LANGUAGE. (See "NLS Options".)

  3. Add the $DEFAULT_LANGUAGE property to the dimension thereby identifying the dimension to Oracle OLAP as the language dimension in the analytic workspace.

Defining Multi-language Variables that are Dimensioned by the Language Dimension To create multi-language variables, you include the language dimension as one of the dimensions of the variable as illustrated in Example 8-8, "Attaching a Language Dimension".

Working with Language Dimension Status When an analytic workspace with a language dimension is attached, Oracle OLAP initializes the status of the language dimension, as follows:

  1. Oracle OLAP limits the language dimension to the value of the SESSION_NLS_LANGUAGE option when the language dimension contains that value.

  2. If the language dimension does not contain value to which the SESSION_NLS_LANGUAGE option is set, then Oracle OLAP limits the language dimension to the language specified in the dimension's $DEFAULT_LANGUAGE property when the $DEFAULT_LANGUAGE property contains a value and when that value is a value of the language dimension.

  3. If the language dimension does not contain value to which the SESSION_NLS_LANGUAGE option is set and if the language dimension's $DEFAULT_LANGUAGE property is empty or names a nonexistent value, Oracle OLAP limits the language dimension to the value of the language dimension to the first value in the dimension's default order.

By default, once initialized, the status of a language dimension cannot be changed. However, you can change this behavior by changing the value of the LOCK_LANGUAGE_DIMS option from TRUE to FALSE which changes the status of the language dimension to ALL and allows you to issue LIMIT statements against the dimension.

Exporting Language Dimensions

When exporting an analytic workspace using EXPORT (to EIF), Oracle OLAP takes the following steps to determine what values of the language dimension to export:

Examples

Example 8-7 Creating a Language Dimension

This example illustrates creating a language dimension named mylangs that supports the use of both French and American and that specifies that the default language is American.

NLS_LANGUAGE = 'AMERICAN'
DEFINE mylangs DIMENSION TEXT
MAINTAIN mylangs ADD 'FRENCH' 'AMERICAN'
CONSIDER mylangs
PROPERTY '$DEFAULT_LANGUAGE' 'AMERICAN'
 
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')
AMERICAN
 
REPORT mylangs
MYLANGS
--------------
FRENCH
AMERICAN

Example 8-8 Attaching a Language Dimension

Assume that in an analytic workspace named myaw that you have created a language dimension named mylangs as described in Example 8-7, "Creating a Language Dimension". Assume also that you have created a products dimension and a prod-desc variable with the following definitions and values.

DEFINE MYLANGS DIMENSION TEXT
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')
AMERICAN
 
DEFINE PRODUCTS DIMENSION TEXT
DEFINE PROD_DESC VARIABLE TEXT <PRODUCTS MYLANGS>

MYLANGS
--------------
FRENCH
AMERICAN
 
PRODUCTS
--------------
PROD01
PROD02
 
               ------PROD_DESC------
               ------PRODUCTS-------
MYLANGS          PROD01     PROD02
-------------- ---------- ----------
FRENCH         Pantalons  JupesAMERICAN       Trousers   Skirts
 

Assume that you attach the analytic workspace. By displaying the options for the analytic workspace and requesting a A report of mylangs and prod_desc, shows that Oracle OLAP has limited the mylangs dimension to American which is the value of the SESSION_NLS_LANGUAGE option.

SHOW NLS_LANGUAGE
AMERICAN
AW ATTACH myaw RW
" Get the default language in our language dimension
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')
AMERICAN
SHOW SESSION_NLS_LANGUAGE
AMERICAN
SHOW LOCK_LANGUAGE_DIMS
yes
SHOW STATIC_SESSION_LANGUAGE
no

REPORT mylangs

MYLANGS
--------------
AMERICAN
 
REPORT prod_desc
               ------PROD_DESC------
               ------PRODUCTS-------
MYLANGS          PROD01     PROD02
-------------- ---------- ----------
AMERICAN       Trousers   Skirts

Example 8-9 Changing NLS_LANGUAGE

Assume that you have attached the analytic workspace myaw as described in Example 8-8, "Attaching a Language Dimension". Now you change the value of NLS_LANGUAGE to French. Because the value of STATIC_SESSION_LANGUAGE is set to NO, making this change effectively changes the value of the SESSION_NLS_LANGUAGE option to French. When the value of SESSION_NLS_LANGUAGE option is French, as a report of mylangs and prod_desc illustrates, Oracle OLAP limits the mylangs dimension to French.

SET NLS_LANGUAGE= 'FRENCH'
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')
AMERICAN
SHOW NLS_LANGUAGE
FRENCH
SHOW SESSION_NLS_LANGUAGE
FRENCH
SHOW LOCK_LANGUAGE_DIMS
oui
SHOW STATIC_SESSION_LANGUAGE
non

REPORT mylangs
MYLANGS
--------------
FRENCH
 
REPORT prod_desc
               ------PROD_DESC------
               ------PRODUCTS-------
MYLANGS          PROD01     PROD02
-------------- ---------- ----------
FRENCH         Pantalons  Jupes

Example 8-10 Setting NLS_LANGUAGE to a Value that is Not in a Language Dimension

Assume that in the analytic workspace named myaw (described in Example 8-9, "Changing NLS_LANGUAGE" ) the value of NLS_LANGUAGE is set first to American and then set to Spanish. As illustrated in the following code, since the language dimension, mylangs, does not include Spanish as one of its values, Oracle OLAP limits the mylangs dimension using the value of the $DEFAULT_LANGUAGE property which is American.

"Change the value of NLS_LANGUAGE to AMERICAN
SET NLS_LANGUAGE= 'AMERICAN'
"Change the value of NLS_LANGUAGE to SPANISH
SET NLS_LANGUAGE= 'SPANISH'
 
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')
AMERICAN
 
SHOW NLS_LANGUAGE
SPANISH
 
SHOW SESSION_NLS_LANGUAGE
SPANISH
 
SHOW LOCK_LANGUAGE_DIMS
sí

SHOW STATIC_SESSION_LANGUAGE
no
 
REPORT mylangs
MYLANGS
--------------
AMERICAN
 
REPORT prod_desc
               ------PROD_DESC------
               ------PRODUCTS-------
MYLANGS          PROD01     PROD02
-------------- ---------- ----------
AMERICAN       Trousers   Skirts

Assume that you had defined the mylangs language dimension without specifying a default language using the following code.

DEFINE mylangs DIMENSION TEXT
MAINTAIN mylangs ADD 'FRENCH' 'AMERICAN'
CONSIDER mylangs
PROPERTY '$DEFAULT_LANGUAGE' ''

In this case, when you set the value of NLS_LANGUAGE to Spanish, since the language dimension, mylangs does not have a value specified for its $DEFAULT_LANGUAGE property, Oracle OLAP limits the mylangs dimension using the first value in the mylangs dimension which is French.

NLS_LANGUAGE = 'SPANISH'
SHOW OBJ(PROPERTY '$DEFAULT_LANGUAGE' 'mylangs')

SHOW NLS_LANGUAGE
SPANISH
SHOW SESSION_NLS_LANGUAGE
SPANISH
SHOW LOCK_LANGUAGE_DIMS
sí
SHOW STATIC_SESSION_LANGUAGE
no

REPORT mylangs
MYLANGS
--------------
FRENCH

REPORT prod_desc
               ------PROD_DESC------
               ------PRODUCTS-------
MYLANGS          PROD01     PROD02
-------------- ---------- ----------
FRENCH         Pantalons  Jupes