Extensions.I18n.GetCurrentLocale

From emotive
Jump to navigation Jump to search

Classification

Name GetCurrentLocale
Short Description Retrieves the current locale code
Class Term
Extension OTX i18n extension
Group Locale settings related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm I18n.GetCurrentLocale();

Description

The GetCurrentLocale term will retrieve the current locale code that is used by the runtime system. The returned locale code will be a combination of the ISO 639-1 two-letter language code followed by a hyphen, and then the uppercase two letter country code as defined by ISO 3166. Optionally, a variant code may be added in case of additional customizations (headed by another hyphen). The variant codes are not defined by this standard.

If no current locale is selected, the system will return the default locale.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
String Current locale code of the runtime system.

Properties

  • NONE

OTL Examples

/// Local Declarations

String String1 = "";

/// Flow

String1 = I18n.GetCurrentLocale();

See also

GetAllLocales