Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JS_SetDefaultLocale

This article needs a technical review. How you can help.

This article covers features introduced in SpiderMonkey 24

Set and reset the default locale for the ECMAScript Internationalization API.

Syntax

bool
JS_SetDefaultLocale(JSRuntime *rt, const char *locale);

void
JS_ResetDefaultLocale(JSRuntime *rt);
Name Type Description
rt JSRuntime * Pointer to a JS runtime
locale const char * String represents locale.

Description

JS_SetDefaultLocale sets the default locale for the ECMAScript Internationalization API (Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat).

Note that the Internationalization API encourages clients to specify their own locales.

The locale string remains owned by the caller.

JS_ResetDefaultLocale resets the default locale to OS defaults.

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,