setDefault (Locale - JavaScript)

Sets the default locale for this instance of the Java Virtual Machine. This does not affect the host locale.

If there is a security manager, its checkPermission method is called with a PropertyPermission("user.language", "write") permission before the default locale is changed.

The Java Virtual Machine sets the default locale during startup based on the host environment. It is used by many locale-sensitive methods if no locale is explicitly specified.

Since changing the default locale may affect many different areas of functionality, this method should only be used if the caller is prepared to re-initialize locale-sensitive code running within the same Java Virtual Machine, such as the user interface.

Defined in

Locale (Runtime - JavaScript)

Syntax

setDefault(Locale:Locale) : void
Parameters Description
Locale The new default locale for this instance of the Java Virtual Machine.