Class: l10n

l10n

Constructor

new l10n()

Additional documentation can be found in the GitHub repository.
Source:

Methods

(static) getLangName()

returns the name of the currently selected language
Source:

(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
Source:

(static) translateDocument()

translates the whole DOM recursively
Source:
See:
  • yasp.l10n#translateSingleDomElement

(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
Source:
See:
  • yasp.l10n#translateDocument