Methods
(static) getLangName()
returns the name of the currently selected language
(static) getTranslation(key, params)
translates a single key and replaces placeholders (`{0}`) with values given in the params-parameter.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
String | the key to translate |
params |
Array.<String> | the parameters to put in the translated string |
(static) translateDocument()
translates the whole DOM recursively
(static) translateSingleDomElement(element)
translates a DOM-Element using the key given in its data-l10n attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
element |
object | the DOM-Element to translate |