This class simply represents a global Language service. Things such as the UI/Speech sign on to the language change event and update themselves accordingly when it's fired.
Static Public Member Functions | |
| static void | Setup (string defaultLanguage) |
| Called at startup. Sets up the default language. More... | |
| static void | LanguageChanged () |
| Tells all the OnLanguageChanged subscribers the language changed. Calling this directly is an alternative way of refreshing all elements. More... | |
| static string | Escape (string xml) |
| Swaps e.g. < with > so the text won't get treated like xml/html. More... | |
Static Public Attributes | |
| static string | VariableModifiers ="" |
| A string appended onto the end of variable names for handling gender. More... | |
| static WhitespaceMode | Whitespace =WhitespaceMode.Normal |
| The global whitespace mode. By default sequences of spaces will be collapsed into one. More... | |
Properties | |
| static Gender | Gender [get, set] |
| Gets or sets the active gender. Internally fires the OnGenderChanged event. More... | |
| static string | Language [get, set] |
| Gets or sets the code of the active language (e.g. "en"). Internally fires the OnLanguageChanged event. More... | |
Events | |
| static LanguageChange | OnLanguageChanged |
| An event fired when the language is changed. More... | |
| static TextModifierChange | OnGenderChanged |
| An event fired when the player gender changes. More... | |
Static Private Attributes | |
| static string | _Language ="en" |
| The current language. See Dom.Text.Language. More... | |
| static Gender | _Gender =Gender.Either |
| The current gender. See Dom.Text.Gender. More... | |
|
inlinestatic |
Swaps e.g. < with > so the text won't get treated like xml/html.
| xml | The xml to escape. |
|
inlinestatic |
Tells all the OnLanguageChanged subscribers the language changed. Calling this directly is an alternative way of refreshing all elements.
|
inlinestatic |
Called at startup. Sets up the default language.
| defaultLanguage | The code for the default language, e.g. "en". |
|
staticprivate |
The current gender. See Dom.Text.Gender.
|
staticprivate |
The current language. See Dom.Text.Language.
|
static |
A string appended onto the end of variable names for handling gender.
|
static |
The global whitespace mode. By default sequences of spaces will be collapsed into one.
|
staticgetset |
Gets or sets the active gender. Internally fires the OnGenderChanged event.
|
staticgetset |
Gets or sets the code of the active language (e.g. "en"). Internally fires the OnLanguageChanged event.
|
static |
An event fired when the player gender changes.
|
static |
An event fired when the language is changed.