ngx-mat-daterange-picker icon indicating copy to clipboard operation
ngx-mat-daterange-picker copied to clipboard

Problems with localization

Open Crowdium opened this issue 6 years ago • 2 comments

Thanks for this great component.

I'm trying to localize the datepicker into spanish. I tried using the option locale:'es' but nothing changes, neither the month names nor the rest of the text.

Is there any way to easily localize the component without editing the vendor files?

Crowdium avatar Feb 01 '19 15:02 Crowdium

Hi!

Just override MAT_DATE_LOCALE on providers at app.module.ts:

import {MAT_DATE_LOCALE} from '@angular/material/core';

@NgModule({
  providers: [
    {provide: MAT_DATE_LOCALE, useValue: 'es-ES'},
  ],
})

klocus avatar Apr 26 '19 16:04 klocus

Is it possible to specify the language at runtime? Our customers should have the choice to switch between languages

rwenig026 avatar Nov 17 '20 09:11 rwenig026