Multilanguage text value
This value is capable of storing texts for multiple languages.
Methods
Creates a new Language with an englisch entry.
Example:
let lang = new_en;
assert_eq!;
Creates a new Language with an german entry.
Example:
let lang = new_de;
assert_eq!;
Creates a new Language with multiple translations.
Example:
let lang = new_multi;
assert_eq!;
assert_eq!;
Shows the text for the given langauge.
This function falls back to english if the text was not found. If english was also not found, it falls back to any language available.
Example:
let lang = new_multi;
assert_eq!;
assert_eq!;
assert_eq!;
let lang = new_multi;
assert_eq!;
assert_eq!;
assert_eq!;
Returns the text for a specific language when available.
Example:
let lang = new_multi;
assert_eq!;
assert_eq!;
Sets the text for a specific language when available.
Example:
let lang = new;
lang.set;
assert_eq!;
Protocols
protocol index_get
let output = value
Try to get the text for a specific language by it's index string.
Example:
let lang = new_de;
assert_eq!;
protocol index_set
value= input
Sets the text for a specific language by it's index string.
Example:
let lang = new;
lang = "Hallo";
assert_eq!;