MatDatepickerIntl switch between English and French languages
Hi all,
I am trying to implement MatDatepickerIntl for English and French languages. I need aria-label to be changed whenever I switch the language in the application.
What troubleshooting steps have you tried?
Have tried implementing with just one language (either En or Fr), works fine. Cannot understand how I can implement that for 2 languages.
My steps are:
1.I have declared the provider under my app module ts:
{provide: MatDatepickerIntl, useClass: DatepickerEn }
- and then in DatepickerEn class I am simply setting:
export class DatepickerEn extends MatDatepickerIntl {
constructor() {
super();
}
openCalendarLabel = 'Open Datepicker'
}
But again, it just works fine for 1 language. How can I include 2 language?
Environment
- Angular: 7
- CDK/Material: 7
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
We don't currently support switching language like this at run-time. This is something we may consider for the the future.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.