localization

An object that serves as a namespace for the methods that are used to localize an application.

loadMessages()

Loads DevExtreme messages.

Module: localization
Export: loadMessages
Parameters:
messages:

Object

An object containing messages to load.

The object passed to this method should have the following structure. The first level keys are locale identifiers, which hold an object consisting of key-value pairs.

JavaScript
{
    "en": {
        "Yes": "Yes",
        "No": "No",
        . . .
    },
    "es": {
        "Yes": "Si",
        "No": "No",
        . . .
    }
}

locale()

Gets the current locale identifier.

Module: localization
Export: locale
Return Value:

String

The identifier of the current locale.

locale(locale)

Sets the current locale identifier.

Module: localization
Export: locale
Parameters:
locale:

String

The required locale identifier.