ngx-translate-with-country
v1.0.1
Published
The internationalization (i18n) library for Angular with Language and Country Support
Downloads
103
Maintainers
Readme
ngx-translate with Language and Country Support
The internationalization (i18n) library for Angular with language and country support.
This is a fork of ngx-translate library.
Only difference from the original library is using country variable in functions like below.
import {Component} from '@angular/core';
import {TranslateService} from '@ngx-translate/core';
@Component({
selector: 'app',
template: `
<div>{{ 'HELLO' | translate:param }}</div>
`
})
export class AppComponent {
param = {value: 'world'};
constructor(translate: TranslateService) {
// this language will be used as a fallback when a translation isn't found in the current language
translate.setDefaultLang('en', 'country');
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use('en', 'country');
}
}