zw-language-selector
v1.1.0
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
Downloads
217
Readme
ZwLanguageSelector
This library was generated with Angular CLI version 19.0.0.
Usage
Just install the package with:
npm install zw-language-select
and import the 'ZwLanguageSelectModule' to your own module where you want to use it.
Code Example
Firstly you should import the run the 'LanguageSelectService' in to the component where you want to use the component and run 'setLanguageList(languageList: Language[])' method.
private languageSelectService: LanguageSelectService
After you can use it like this:
constructor(private languageSelectService: LanguageSelectService) {
this.languageSelectService.setLanguageList(yourOwnLanguageList: Language[])
}
If you want to change the select input background or any other style you can set your custom css.
Style Example
.language-select-input .mat-mdc-text-field-wrapper {
background-color: aquamarine!important;
}
After these correctly done you can use the translate pipe to translate keys from your own language i18n files.
Html Example
<h1>{{'YOUR.OWN.KEY' | translate}}</h1>
Further help
If you are not understanding something about the usage, feel free to reach me out.