The heart of the Localization system. Every Localization, its serialisation and editing is managed here.
Public Member Functions | |
void | AddLocalization (LocalizationID LocalizationID, Dictionary< LocalizationLanguage, string > Localizations) |
Adds a new Localization to the system. | |
void | AddScope (string scopeName) |
Adds a new LocalizationScope to the system. | |
void | AddLanguage (string languageName, string languageShortName) |
Adds a new LocalizationLanguage to the system. | |
void | RemoveLanguage (LocalizationLanguage language) |
Removes a LocalizationLanguage from the system. | |
void | RemoveScope (LocalizationScope scope) |
Removes a LocalizationScope from the system. | |
void | RemoveLocalization (LocalizationID LocalizationID) |
Removes a Localization, that is a LocalizationID with all its content, from the system. | |
void | EditLocalizationID (LocalizationID oldID, LocalizationID newID) |
Edits an existing LocalizationID by replacing the IDs, but keeping its content. | |
void | EditScope (LocalizationScope oldScope, string newScopeName) |
Replaces a LocalizationScope with a new one for all available data. | |
void | EditLanguage (LocalizationLanguage oldLanguage, string newLanguageName, string newLanguageShortName) |
Replaces a LocalizationLanguage with a new one for all available data. | |
void | EditLocalization (LocalizationID LocalizationID, Dictionary< LocalizationLanguage, string > Localizations) |
Edits a given Localization found by the LocalizationID by replacing the current content with Localizations . | |
void | WriteData () |
Writes the data to disk. For this to work, a valid path within the project must be setup. | |
void | Initialize () |
Initializes the Localizer. This is required due to its dependency on a valid path. | |
Properties | |
static Localizer | Instance [get] |
Dictionary< LocalizationID, Dictionary< LocalizationLanguage, string > > | LocalizationData [get] |
HashSet< LocalizationLanguage > | LocalizationLanguages [get] |
HashSet< LocalizationScope > | LocalizationScopes [get] |
LocalizationScope | DefaultScope [get] |
bool | IsInitialized [get] |
Events | |
Action< LocalizationScope > | ScopeEdited |
Action< LocalizationLanguage > | LanguageEdited |
Action< LocalizationID > | LocalizationIDEdited |
void UnityToolbox.UI.Localization.Localizer.AddLanguage | ( | string | languageName, |
string | languageShortName | ||
) |
languageName | |
languageShortName |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize().
void UnityToolbox.UI.Localization.Localizer.AddLocalization | ( | LocalizationID | LocalizationID, |
Dictionary< LocalizationLanguage, string > | Localizations | ||
) |
LocalizationID | |
Localizations |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize(), and UnityToolbox.UI.Localization.LocalizationLanguage.Name.
void UnityToolbox.UI.Localization.Localizer.AddScope | ( | string | scopeName | ) |
scopeName |
StatusException |
References UnityToolbox.UI.Localization.LocalizationScope.Equals(), and UnityToolbox.UI.Localization.Localizer.Initialize().
void UnityToolbox.UI.Localization.Localizer.EditLanguage | ( | LocalizationLanguage | oldLanguage, |
string | newLanguageName, | ||
string | newLanguageShortName | ||
) |
oldLanguage | |
newLanguageName | |
newLanguageShortName |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize().
Referenced by UnityToolbox.UI.Localization.Editor.LocalizationEditLanguageWindow.OnGUI().
void UnityToolbox.UI.Localization.Localizer.EditLocalization | ( | LocalizationID | LocalizationID, |
Dictionary< LocalizationLanguage, string > | Localizations | ||
) |
LocalizationID | |
Localizations |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize(), and UnityToolbox.UI.Localization.LocalizationLanguage.Name.
Referenced by UnityToolbox.UI.Localization.Editor.LocalizationEditIDWindow.OnGUI().
void UnityToolbox.UI.Localization.Localizer.EditLocalizationID | ( | LocalizationID | oldID, |
LocalizationID | newID | ||
) |
oldID | |
newID |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize().
Referenced by UnityToolbox.UI.Localization.Editor.LocalizationEditIDWindow.OnGUI().
void UnityToolbox.UI.Localization.Localizer.EditScope | ( | LocalizationScope | oldScope, |
string | newScopeName | ||
) |
oldScope | |
newScopeName |
StatusException |
References UnityToolbox.UI.Localization.LocalizationScope.Equals(), UnityToolbox.UI.Localization.Localizer.Initialize(), and UnityToolbox.UI.Localization.LocalizationScope.Name.
Referenced by UnityToolbox.UI.Localization.Editor.LocalizationEditScopeWindow.OnGUI().
void UnityToolbox.UI.Localization.Localizer.Initialize | ( | ) |
References UnityToolbox.General.Preferences.ProjectPrefs.GetString(), and UnityToolbox.General.Management.ResourcesUtil.IsFullPathValid().
Referenced by UnityToolbox.UI.Localization.Localizer.AddLanguage(), UnityToolbox.UI.Localization.Localizer.AddLocalization(), UnityToolbox.UI.Localization.Localizer.AddScope(), UnityToolbox.UI.Localization.Localizer.EditLanguage(), UnityToolbox.UI.Localization.Localizer.EditLocalization(), UnityToolbox.UI.Localization.Localizer.EditLocalizationID(), UnityToolbox.UI.Localization.Localizer.EditScope(), UnityToolbox.UI.Localization.LocalizzedText.OnValidate(), UnityToolbox.UI.Localization.Localizer.RemoveLanguage(), UnityToolbox.UI.Localization.Localizer.RemoveLocalization(), UnityToolbox.UI.Localization.Localizer.RemoveScope(), and UnityToolbox.UI.Localization.Localizer.WriteData().
void UnityToolbox.UI.Localization.Localizer.RemoveLanguage | ( | LocalizationLanguage | language | ) |
language |
StatusException |
References UnityToolbox.UI.Localization.Localizer.Initialize().
void UnityToolbox.UI.Localization.Localizer.RemoveLocalization | ( | LocalizationID | LocalizationID | ) |
LocalizationID |
References UnityToolbox.UI.Localization.Localizer.Initialize().
void UnityToolbox.UI.Localization.Localizer.RemoveScope | ( | LocalizationScope | scope | ) |
scope |
StatusException |
References UnityToolbox.UI.Localization.LocalizationScope.Equals(), UnityToolbox.UI.Localization.Localizer.Initialize(), and UnityToolbox.UI.Localization.LocalizationScope.Name.
void UnityToolbox.UI.Localization.Localizer.WriteData | ( | ) |
References UnityToolbox.UI.Localization.Localizer.Initialize(), and UnityToolbox.General.Management.ResourcesUtil.WriteFile().
Referenced by UnityToolbox.UI.Localization.Editor.LocalizationEditIDWindow.OnGUI(), UnityToolbox.UI.Localization.Editor.LocalizationEditLanguageWindow.OnGUI(), and UnityToolbox.UI.Localization.Editor.LocalizationEditScopeWindow.OnGUI().
|
get |
|
staticget |
|
get |
Referenced by UnityToolbox.UI.Localization.LocalizzedText.OnValidate().
|
get |
|
get |
|
get |
Action<LocalizationLanguage> UnityToolbox.UI.Localization.Localizer.LanguageEdited |
Action<LocalizationID> UnityToolbox.UI.Localization.Localizer.LocalizationIDEdited |
Action<LocalizationScope> UnityToolbox.UI.Localization.Localizer.ScopeEdited |