getLocaleString (XSPContext - JavaScript™)
Gets the locale for the current session as a string.
Defined in
XSPContext (JavaScript)Syntax
getLocaleString() : string| Parameter | Description |
|---|---|
string |
The locale string. |
Usage
The locale string is in standard format, for example,en-US for English (US) or fr-CA for
French (Canada).Examples
This example gets the locale for the current context as a string.if(!context.getLocaleString().equals("fr-CA")) {
return "Your locale is not set to French Canadian."
}