getCurrentLocale method

Returns the current locale.

The platform's locale string should be available. However, if it is missing the function queries available JavaScript APIs for a suitable value.

Syntax

<static> getCurrentLocale() → {String}

Returns

Returns a string containing the current locale, or null if it is not available.

[/reference/refbody/section/sectiondiv {""})

Type:

String

(sectiondiv]

Example

var sLocale = hwc.getCurrentLocale();

Source

Timezone.js, line 29.