Constructor
new Localization(lang)
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lang |
string |
en
|
Language code. |
Classes
Methods
message(key) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
key |
string | Key name of identifier. |
Returns:
Message in selected langauge.
- Type
- string
sample(key) → {string}
Gets html markup from sample templates.
- Source:
Gets html markup from sample templates.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | name of identifier. |
Returns:
HTML-markup as sample.
- Type
- string
update(shadowRoot)
Update all language related fileds using attribute data-i18n.
- Source:
Update all language related fileds using attribute data-i18n.
Parameters:
Name | Type | Description |
---|---|---|
shadowRoot |
Object |