Space Engineers
|
Class designed around an idea of localization contexts. Context can be game, gui screen, mission, campaign or a task. Consists of a multitude of files stored in content folder. Each context can be modded, same way as created. More...
Classes | |
struct | LocalizationFileInfo |
Public Member Functions | |
void | Dispose () |
Clears all data before shutting down context. More... | |
void | Switch (string language) |
Tries to switch context to provided language. More... | |
StringBuilder | Localize (MyStringId id) |
Retrives the localized content from entry with provided id. More... | |
override int | GetHashCode () |
override bool | Equals (object obj) |
Protected Member Functions | |
StringBuilder | AllocateOrGet (string text) |
Creates or provides already existing string builder. More... | |
bool | Equals (MyLocalizationContext other) |
Protected Attributes | |
readonly MyStringId | m_contextName |
readonly List< string > | m_languagesHelper = new List<string>() |
readonly Dictionary< MyStringId, MyObjectBuilder_Localization > | m_loadedFiles = new Dictionary<MyStringId, MyObjectBuilder_Localization>(MyStringId.Comparer) |
readonly Dictionary< MyStringId, StringBuilder > | m_idsToTexts = new Dictionary<MyStringId, StringBuilder>(MyStringId.Comparer) |
Properties | |
ListReader< string > | Languages [get] |
Defined languages. More... | |
IEnumerable< MyStringId > | Ids [get] |
All accessible ids from context. More... | |
MyStringId | Name [get] |
Name of this context. More... | |
string | CurrentLanguage [get] |
Currently selected language. More... | |
StringBuilder | this[MyStringId id] [get] |
Simplified accessor. More... | |
StringBuilder | this[string nameId] [get] |
Simplified accessor. Preferably use the string id version. More... | |
Class designed around an idea of localization contexts. Context can be game, gui screen, mission, campaign or a task. Consists of a multitude of files stored in content folder. Each context can be modded, same way as created.
Definition at line 18 of file MyLocalizationContext.cs.
|
inlineprotected |
Creates or provides already existing string builder.
text |
Definition at line 309 of file MyLocalizationContext.cs.
|
inline |
Clears all data before shutting down context.
Definition at line 114 of file MyLocalizationContext.cs.
|
inlineprotected |
Definition at line 354 of file MyLocalizationContext.cs.
|
inline |
Definition at line 359 of file MyLocalizationContext.cs.
|
inline |
Definition at line 349 of file MyLocalizationContext.cs.
|
inline |
Retrives the localized content from entry with provided id.
id | Unique identifier. |
Definition at line 329 of file MyLocalizationContext.cs.
|
inline |
Tries to switch context to provided language.
language |
Definition at line 221 of file MyLocalizationContext.cs.
|
protected |
Definition at line 39 of file MyLocalizationContext.cs.
|
protected |
Definition at line 47 of file MyLocalizationContext.cs.
|
protected |
Definition at line 41 of file MyLocalizationContext.cs.
|
protected |
Definition at line 45 of file MyLocalizationContext.cs.
|
get |
Currently selected language.
Definition at line 87 of file MyLocalizationContext.cs.
|
get |
All accessible ids from context.
Definition at line 68 of file MyLocalizationContext.cs.
|
get |
Defined languages.
Definition at line 57 of file MyLocalizationContext.cs.
|
get |
Name of this context.
Definition at line 79 of file MyLocalizationContext.cs.
|
get |
Simplified accessor.
id | Tag to localize. |
Definition at line 195 of file MyLocalizationContext.cs.
|
get |
Simplified accessor. Preferably use the string id version.
nameId | Name identifier. (will be converted to MyStringId) |
Definition at line 208 of file MyLocalizationContext.cs.