Constructor
new Translator(language_code, data)
Parameters:
| Name | Type | Description |
|---|---|---|
language_code |
string | "en" |
data |
LanguagePack |
- Source:
Methods
translate(obj) → {string}
Transforms translatable string to Translator language Replaces {tags} with corresponding data values
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Translatable |
- Source:
Returns:
- Type
- string