Interface: IL10n

IL10n

Methods

(async) get(key, args, fallback) → {Promise.<string>}

Translates text identified by the key and adds/formats data using the args property bag. If the key was not found, translation falls back to the fallback text.
Parameters:
Name Type Description
key string
args object
fallback string
Source:
Returns:
Type
Promise.<string>

(async) getDirection() → {Promise.<string>}

Source:
Returns:
- Resolves to 'rtl' or 'ltr'.
Type
Promise.<string>

(async) getLanguage() → {Promise.<string>}

Source:
Returns:
- Resolves to the current locale.
Type
Promise.<string>

(async) translate(element) → {Promise.<void>}

Translates HTML element.
Parameters:
Name Type Description
element HTMLElement
Source:
Returns:
Type
Promise.<void>