Search Results set_session_nls_language
Overview
APPS.OTA_MLS_UTILITY is a multilingual session utility package in the Oracle E-Business Suite, owned by the APPS schema and classified as an OTHER API. Its header, otmlsutl.pkb 115.1, dates from May 2003, indicating that the package is a stable, mature component of the E-Business Suite technology stack that has remained essentially unchanged through release 12.1.1 and 12.2.2. The package addresses a recurring requirement in multilingual EBS implementations: the ability to resolve an application-facing language code (as stored in FND_LANGUAGES.LANGUAGE_CODE) into the Oracle NLS language name, and then apply that language to the current database session. Because Oracle Forms sessions in EBS inherit the runtime environment's language settings, utilities such as this one centralize the translation between FND language definitions and NLS session settings. The package also performs cache maintenance after a language switch, ensuring that key flexfield structures cached for the previous language are not reused in the new language context, a subtle but important correctness concern in EBS localization.
Key Procedures and Functions
Two procedures are documented for this package:
- SET_SESSION_LANGUAGE_CODE — Sets the session language from a two-digit language code and clears the key flex cache. This is the entry point most commonly sought when the term
set_session_language_codeis used; it accepts the FND language code, resolves the corresponding NLS language, applies it to the session, and invalidates flexfield cache entries so subsequent flexfield calls are rebuilt under the new language. Per the embedded comments, the post-success condition is thatuserenv('LANG')reflects the requested language code. - SET_SESSION_NLS_LANGUAGE — Applies an NLS language to the database session. In practice this is the lower-level companion to SET_SESSION_LANGUAGE_CODE, working directly with the NLS language value rather than the FND two-digit code.
The package body additionally contains the private helper get_nls_language, which the documentation excerpts in full. It queries FND_LANGUAGES for the NLS language matching a supplied language code and raises a nls_language_not_found exception, logging the failure via hr_utility.set_location with the location string 'Cannot find nls_language, ota_mls_utility.get_nls_language', before re-raising. Both public procedures are built on this resolution logic.
Tables Accessed
The package references two objects through APPS synonyms:
- FND_LANGUAGES — Read-only. The
get_nls_languagecursor selectsNLS_LANGUAGEwhereLANGUAGE_CODEequals the caller-supplied value. This table is the standard EBS repository of installed and installed-but-not-enabled languages and is the authoritative mapping between the two-letter code used by application setup and the NLS name used by the database. - DBMS_SESSION — Used to modify session attributes, specifically the language setting applied at the session level once the NLS language has been resolved. No persistent data is written by this package; all effects are scoped to the current session.
Usage Notes
OTA_MLS_UTILITY is an internal utility rather than a user-facing business API. It is referenced by three other packages, and typical invocations occur from within Oracle Forms-based modules, localization-related concurrent programs, and custom PL/SQL code that must render data in a language other than the session default, such as when generating multilingual reports, notifications, or interface extracts. Because the setting is session-scoped, care should be taken in pooled or long-lived sessions: changing the language affects subsequent operations until the session ends or the caller restores the prior setting. Callers should also anticipate the nls_language_not_found condition when an uninstalled or misspelled language code is passed, and should handle the resulting exception. Debug tracing is available when HR_UTILITY.DEBUG_ENABLED is true, consistent with Oracle's standard debugging conventions for the HR and OTA product family.
-
PACKAGE BODY: APPS.OTA_MLS_UTILITY
12.1.1
-
PACKAGE BODY: APPS.OTA_MLS_UTILITY
12.2.2
-
PACKAGE: APPS.OTA_MLS_UTILITY
12.1.1
-
PACKAGE: APPS.OTA_MLS_UTILITY
12.2.2
-
PACKAGE: APPS.HR_KFLEX_UTILITY
12.1.1
-
PACKAGE: APPS.HR_KFLEX_UTILITY
12.2.2
-
PACKAGE BODY: APPS.HR_KFLEX_UTILITY
12.2.2
-
PACKAGE BODY: APPS.HR_KFLEX_UTILITY
12.1.1
-
APPS.HR_KFLEX_UTILITY dependencies on FND_LANGUAGES
12.2.2
-
APPS.HR_KFLEX_UTILITY dependencies on PAY_CORE_MLS
12.1.1
-
APPS.HR_KFLEX_UTILITY dependencies on PAY_CORE_MLS
12.2.2
-
APPS.OTA_MLS_UTILITY dependencies on FND_LANGUAGES
12.2.2
-
APPS.OTA_MLS_UTILITY dependencies on FND_LANGUAGES
12.1.1
-
APPS.HR_KFLEX_UTILITY dependencies on FND_LANGUAGES
12.1.1
-
APPS.OTA_MLS_UTILITY dependencies on DBMS_SESSION
12.1.1
-
APPS.HR_KFLEX_UTILITY dependencies on FND_LANGUAGES
12.2.2
-
APPS.HR_KFLEX_UTILITY dependencies on FND_LANGUAGES
12.1.1
-
APPS.OTA_MLS_UTILITY dependencies on FND_LANGUAGES
12.1.1
-
APPS.OTA_MLS_UTILITY dependencies on DBMS_SESSION
12.2.2
-
APPS.OTA_MLS_UTILITY dependencies on FND_LANGUAGES
12.2.2
-
APPS.HR_KFLEX_UTILITY dependencies on DBMS_SESSION
12.1.1
-
APPS.HR_KFLEX_UTILITY dependencies on DBMS_SESSION
12.2.2
-
APPS.OTA_MLS_UTILITY dependencies on HR_UTILITY
12.1.1
-
APPS.OTA_MLS_UTILITY dependencies on HR_UTILITY
12.2.2
-
APPS.HR_KFLEX_UTILITY dependencies on FND_FLEX_EXT
12.2.2
-
APPS.HR_KFLEX_UTILITY dependencies on FND_FLEX_EXT
12.1.1