You can use Oracle Forms Built-in functions to obtain the current value of the NLS environment variables for use in PL/SQL code:
|
DEVELOPER_NLS_LANG |
USER_NLS_LANG |
---|---|---|
Built-in |
GET_FORM_PROPERTY |
GET_APPLICATION_PROPERTY |
Property |
MODULE_NLS_LANG |
USER_NLS_LANG |
Because both USER_NLS_LANG and DEVELOPER_NLS_LANG default to the value of NLS_LANG, the Oracle Forms NLS properties will hold the value of NLS_LANG if either variable is not specifically set.
Both Oracle Forms NLS properties have variations to retrieve either the complete environment variable or a specific portion of it. This table shows the four properties of the GET_APPLICATION_PROPERTY Built-in that returns the USER_NLS_LANG environment variable:
Property |
Returns |
---|---|
FORMS_USER_DATE_FORMAT | USER_DATE_FORMAT |
FORMS_OUTPUT_DATE_FORMAT | OUTPUT_DATE_FORMAT |
FORMS_ERROR_DATE_FORMAT | ERROR_DATE_FORMAT |
FORMS_USER_DATETIME_FORMAT | USER_DATETIME_FORMAT |
FORMS_OUTPUT_DATETIME_FORMAT | OUTPUT_DATETIME_FORMAT |
FORMS_ERROR_DATETIME_FORMAT | ERROR_DATETIME_FORMAT |
NLS_DATE_FORMAT | USER_NLS_DATE_FORMAT |
USER_NLS_LANG |
Entire USER_NLS_LANG variable |
USER_NLS_LANGUAGE |
Language portion only |
USER_NLS_TERRITORY |
Territory portion only |
USER_NLS_CHARACTER_SET |
Character set portion only |
To retrieve the DEVELOPER_NLS_LANG environment variable, call GET_FORM_PROPERTY, using the MODULE_NLS_LANG property.