Translations class
Represents collection of parameters and their values.
Properties
languages | Get the languages in the object in a String array. |
Methods
get(string, string) | Returns the parameter value in type String. The parameter must have the same type as String. Currently only String, int and bool are allowed. If the name is not available, the specified defaultValue is returned. |
set(string, string) | Sets the String value of the parameter specified by name. |
Property Details
languages
Get the languages in the object in a String array.
string[] languages
Property Value
string[]
languages in translations object.
Method Details
get(string, string)
Returns the parameter value in type String. The parameter must have the same type as String. Currently only String, int and bool are allowed. If the name is not available, the specified defaultValue is returned.
function get(key: string, def?: string): string
Parameters
- key
-
string
The parameter name.
- def
-
string
The default value which is returned if the parameter is not available in the collection.
Returns
string
value of the parameter.
set(string, string)
Sets the String value of the parameter specified by name.
function set(key: string, value: string)
Parameters
- key
-
string
The parameter name.
- value
-
string
The value of the parameter.