How to change the language of the control in Ant Design in Angular 8

Dung Do Tien Jan 30 2021 321

I am working with the Ant Design pagination control and it is displaying the page number in Chinese. I want to change it to Vietnamese

How can I change it to what I want?

Have 1 answer(s) found.
  • N

    Nguyen Truong Giang Jan 29 2021

    Step 1: Find your root module and add the following

    import { registerLocaleData } from '@angular/common';
    import { NZ_I18N } from 'ng-zorro-antd/i18n';
    import { vi_VN } from 'ng-zorro-antd/i18n';
    import vi from '@angular/common/locales/vi';
    
    registerLocaleData(vi);

    Step 2: Add the following line in the array providers of the root module

    { provide: NZ_I18N, useValue: vi_VN }
    
Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close