IMPORTANT: This repo is in maintenance mode. Since v19.2, DevExtreme provides localization via Intl API out of the box, and this module is redundant. We do not recommend using it any longer.
Using Intl is an alternative to the Globalize based mechanism documented here. Please note that in comparison to Globalize, there are some restrictions which are described in the section Restrictions below.
Using a script tag
Add a script tag for
devextreme-intl behind your tag for the
Using npm modules
npm install devextreme-intl
importcall to make
devextreme-intlavailable to your code:;
Note that the DevExtreme format object structure documentation page refers to special structures supported by Globalize. When using DevExtreme-Intl, these structures are either unsupported or need to adhere to Intl structural requirements instead.
Here is an example for the use of Intl formats in DataGrid columns:
See more examples here.
You can find full documentation of the localization API in the DevExtreme documentation.
NOTE: Starting with version 17.2, these restrictions are not relevant.
Date parsing is not supported by the ECMAScript Internationalization API. You can read about the position of the ECMAScript community here. As a result, some minor DevExtreme functionality is restricted.
- If you specify a displayFormat for the DateBox widget, any value typed into the editor by a user will not be parsed correctly.
- If you enable searchPanel for the DataGrid widget, the search by date columns will not work.
- If you configure a format for a DataGrid column, any value typed into the editor by a user will not be parsed correctly.
W0012 - Date parsing is invoked while the parser is not defined. See: http://js.devexpress.com/error/W0012
You can specify a custom parser function as part of the
column.format configuration objects to overcome this limitation. Here are some examples:
// Value will be parsed correctly;// Value will not be parsed correctly;// Add a custom parser function;// Search and manual data entry will not work for the date column;// Add a custom parser function;
Install external development dependencies
Build the distribution UMD bundles
devextreme-intl.min.js into the
npm run build
Familiarize yourself with the DevExtreme License.
DevExtreme integration with ECMAScript Internationalization API is released as an MIT-licensed (free and open-source) add-on to DevExtreme.