Methods
-
<static> exists(langKey)
-
Check if a language key exists
Parameters:
Name Type Description langKey
string The language key to find Returns:
True if the language key exists, else False- Type
- boolean
-
<static> get(langKey, vars, number)
-
Get the value for a language key for the user language
Parameters:
Name Type Description langKey
string The language key vars
Object The variables to set in the translation number
int This variable can be set if the language key has singular or plural translations Returns:
The translated language key- Type
- string
-
<static> init(data)
-
Init the module with keys
Parameters:
Name Type Description data
Object The language keys to load -
<static> set(langKey, value)
-
Set a language key translation
Parameters:
Name Type Description langKey
string The language key value
string The translation value