DevExtreme Angular - Localization

Static messages for any DevExtreme widget are defined in a locale-specific dictionary as key-value pairs. To localize the List widget in particular, you need to redefine values for the following keys. To load the dictionaries, use the loadMessages method defined in the DevExpress.localization namespace.

jQuery
JavaScript
DevExpress.localization.loadMessages({
    // Replace "en" with the target locale of the dictionary
    "en": {
        "dxCollectionWidget-noDataText": "No data to display",
        "dxList-pullingDownText": "Pull down to refresh...",
        "dxList-pulledDownText": "Release to refresh...",
        "dxList-refreshingText": "Refreshing...",
        "dxList-pageLoadingText": "Loading...",
        "dxList-nextButtonText": "More",
        "dxList-selectAll": "Select All",
        "dxListEditDecorator-delete": "Delete",
        "dxListEditDecorator-more": "More"
    },
    "de": {
        "dxCollectionWidget-noDataText": "Keine Daten verfügbar",
        // ...
    }
});

// Sets the locale
DevExpress.localization.locale(navigator.language || navigator.browserLanguage);
Angular
TypeScript
import { locale, loadMessages } from 'devextreme/localization';

loadMessages({
    // Replace "en" with the target locale of the dictionary
    "en": {
        "dxCollectionWidget-noDataText": "No data to display",
        "dxList-pullingDownText": "Pull down to refresh...",
        "dxList-pulledDownText": "Release to refresh...",
        "dxList-refreshingText": "Refreshing...",
        "dxList-pageLoadingText": "Loading...",
        "dxList-nextButtonText": "More",
        "dxList-selectAll": "Select All",
        "dxListEditDecorator-delete": "Delete",
        "dxListEditDecorator-more": "More"
    },
    "de": {
        "dxCollectionWidget-noDataText": "Keine Daten verfügbar",
        // ...
    }
});

// Sets the locale
locale(navigator.language || navigator.browserLanguage);
NOTE
DevExtreme ships several predefined dictionaries for most widespread locales. For details, see the Localization topic.

Some messages can be defined by List options as well as by keys. The following table draws the correspondence between options and keys that define the same messages. Note that the options always take precedence over the keys.

Option Key Description
noDataText dxCollectionWidget-noDataText Displayed when the List is empty.
pullingDownText dxList-pullingDownText Displayed when the user begins pulling the List down.
pulledDownText dxList-pulledDownText Displayed when the user have pulled the List down.
refreshingText dxList-refreshingText Displayed while data in the List is being refreshed.
pageLoadingText dxList-pageLoadingText Displayed while another page is loading.
nextButtonText dxList-nextButtonText Displayed on the button that loads the next page. Appears only if the pageLoadMode option is "nextButton".
See Also