@geosdi/ngx-language-translate
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

NgxLanguageTranslate

This library was generated with Angular CLI version 13.0.0.

General information

Service to set locale and language. Languange supported: ['it','en']

Installation

npm i @geosdi/ngx-language-translate --save

It depends on :

"@angular/common": ">=13.0.0",
"@angular/core": ">=13.0.0",
"@ngx-translate/core": ">=14.0.0",
"@ngx-translate/http-loader": ">=7.0.0",
"typescript": ">=4.4.4"

Usage

in AppModule ad providers:

{
  provide: LOCALE_ID,
  deps: [NgxLanguageTranslate],
  useFactory: (languageService: NgxLanguageTranslate) => languageService.locale
}

Methods

Method action
registerLocale(lang: string): void change language and locale
locale(): string return current locale
lang(): string return current lang

Package Sidebar

Install

npm i @geosdi/ngx-language-translate

Weekly Downloads

7

Version

1.1.2

License

MIT

Unpacked Size

28.2 kB

Total Files

11

Last publish

Collaborators

  • vito.salvia