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

Possibility to change the i18n lang outside of the `forRoot`module declaration #67

Open descl opened 3 years ago

descl commented 3 years ago

Is your feature request related to a problem? Please describe. Actually our application is translated in several langs and use ngx-translate to manage that. So when one of our users connect to the app we set is langage via this.translate.use(lang); But with your (awesome ;)) extension the lang is specified directly in the module declaration so it can't be changed afterwords.

Describe the solution you'd like Would love to have a service associated to your extension in order to change the lang of the module. Or at least a new parameter in the attributes to specify the lang?

Thanks again for your lib, Chris

AnthonyNahas commented 3 years ago

@descl thanks for opening this ticket.

May you prove a suitable PR for that? That would be awesome!

Rogermax commented 3 years ago

I made a PR trying to solve it with an input property. It seems to work.