-
-
Notifications
You must be signed in to change notification settings - Fork 51
Localization
Currently, SimplePatchTool has built-in localization for English and Turkish languages. Localized strings are hard-coded into SimplePatchToolCore.Localization.
By default, CultureInfo.CurrentCulture is used to determine the language, but you can use the Localization.SetCulture( CultureInfo culture )
or Localization.SetLanguage( string languageISOCode )
functions to change the language manually. If the desired language is not available, these functions will return false and English localization will be used as fallback.
To provide your own localized strings to the localization system, use the Localization.SetStrings( Dictionary<StringId, string> strings, string languageISOCode = null )
function. It doesn't matter how and where you store the localized strings, as long as you can build a Dictionary<StringId, string> with them. While creating that dictionary, you are recommended to use an instance of Localization.StringIdComparer as the dictionary's IEqualityComparer for better GC usage.