Skip to content

Latest commit

 

History

History
102 lines (75 loc) · 2.44 KB

api.md

File metadata and controls

102 lines (75 loc) · 2.44 KB

Members

warningOn

Display console warning on missing template

markMissing

Marks missing templates on the screen

Functions

setDictionary(locale, dictionary_)

Set active dictionary

localize(input, namespace)

Localize the given string/template

localizeTag(element, namespace)

Localizes the content of a single tag

localizeTags(rootElement, namespace)

Localize all tags marked with the "localize" attribute. Note that if the page, or the part under the rootElement changes, the method should be called again.

render(template, fields)

warningOn

Display console warning on missing template

Kind: global variable

markMissing

Marks missing templates on the screen

Kind: global variable

setDictionary(locale, dictionary_)

Set active dictionary

Kind: global function

Param Description
locale locale name
dictionary_ the dictionary

localize(input, namespace)

Localize the given string/template

Kind: global function

Param Description
input
namespace the namespace to use.

localizeTag(element, namespace)

Localizes the content of a single tag

Kind: global function

Param Description
element the html node
namespace the namespace to use. A 'localize' attribute can also denotes the namespace.

localizeTags(rootElement, namespace)

Localize all tags marked with the "localize" attribute. Note that if the page, or the part under the rootElement changes, the method should be called again.

Kind: global function

Param Description
rootElement starting point to check
namespace the namespace to use. A 'localize' attribute can also denotes the namespace.

render(template, fields)

Kind: global function

Param Description
template the string to translate
fields the list of replacements