# exports.setLanguage(lang)
Updates active language.
Parameters
Name | Types | Description |
---|---|---|
lang | string |
Language code, e.g. 'tr' or 'en'. |
# exports.setStrings(lang, str)
Sets translations for a specific langauge.
Parameters
Name | Types | Description |
---|---|---|
lang | string |
Language code, e.g. 'tr' or 'en'. |
str | Object |
{'string': 'translation'} translation pairs. |
# exports.translate(string)
Translates a string to active language.
Parameters
Name | Types | Description |
---|---|---|
string | String |
String to be translated. |
Returns
String
Translated output.
# utils()
# exports.stringFormat(str, args)
String format function.
Parameters
Name | Types | Description |
---|---|---|
str | String |
String to be formatted |
args | ...* |
Format params |