angular-material-extensions / select-country

Angular Material component that allow users to select a country or nationality with an autocomplete feature
https://angular-material-extensions.github.io/select-country/
MIT License
126 stars 40 forks source link

Change language "on the fly" globally #110

Open antalmate12 opened 1 year ago

antalmate12 commented 1 year ago

Is your feature request related to a problem? Please describe. It would be nice to have an option to change the language of the component "on the fly", for example if I have a big application with multiple languages, I'd set the default language like:

MatSelectCountryModule.forRoot('en'),

Describe the solution you'd like We could maybe add a service that can also control the language, and we could just call it when the entire app's language changes like:

this.selectCountryService.selectLanguage('hu')

so, that I don't have to get the currently selected app language and pass it to select-country every time as an Input