$a.translate

The internationalization (i18n) library for Angular.
See full description here: https://github.com/ngx-translate/core#api

use

use(lang: string): Observable

Changes the lang currently used.

There is shortening for this method this.$a.setLang see

Example

this.$a.translate.use("en");

instant

instant(key: string|Array, interpolateParams?: Object): string|Object

Gets the instant translated value of a key (or an array of keys).

Example

{
  "hello_msg": "Hello {{name}}"
}
let msg = this.$a.translate.instant("hello_msg", {name: "Joe"});

getBrowserLang

getBrowserLang(): string | undefined

Returns the current browser lang if available, or undefined otherwise.

Example

let lang = this.$a.translate.getBrowserLang();