Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Localization

Süleyman Yasir KULA edited this page Aug 26, 2018 · 1 revision

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.

Clone this wiki locally