Search code examples
widgetlocaledevextreme-angular

DevExtreme Angular8 make widgets's message show my language


when use DevExtreme DataGrid,click the delete button,it shows a message,i want to reset the message language to another one - like Japanese or Russian.

my project is Angular8,at the top of app.module.ts,before @NgModule, i set the language like this:

import xxxxxxxxx;

import {locale} from 'devextreme/localization';
locale(navigator.language);

@NgModule({
  declarations: [
    AppComponent,
    xxxxxxx

i use Chrome,the browser's language is set to Chinese, but when i click delete button, the message is remain English


Solution

  • You need to call the loadMessages to make a localization apply to a widget. There is an online demo that shows this approach in action.