Class CustomLocalization
Wrapper to hold each mod localization data.
Inheritance
CustomLocalization
Assembly: Jotunn.dll
Syntax
public class CustomLocalization : CustomEntity
Constructors
Methods
| Name |
Description |
|
AddFileByPath(string, bool)
|
Add a translation file via absolute path. |
|
AddJsonFile(string, string)
|
Add a json language file (match crowdin format). |
|
AddLanguageFile(string)
|
Add a Unity style translation file. |
|
AddTranslation(in string, Dictionary<string, string>)
|
Add a group of translations. |
|
AddTranslation(in string, string)
|
Add a translation. |
|
AddTranslation(in string, in string, string)
|
Add a translation. |
|
AddYamlFile(string, string)
|
Add a YAML language file. Keys are flat string-to-string mappings. |
|
ClearAll()
|
Clear all localization data. |
|
ClearLanguage(in string)
|
Attempts to remove given language. |
|
ClearToken(in string)
|
Attempts to remove a given token from default language. |
|
ClearToken(in string, in string)
|
Attempts to remove a given token from certain language. |
|
Contains(in string, in string)
|
Checks if a translation exists for given language and token. |
|
GetLanguages()
|
Retrieve list of languages that have been added. |
|
GetTranslations(in string)
|
Retrieve translations for given language. |
|
ToString()
|
Returns a string that represents the current object. |
|
TryTranslate(string)
|
Retrieve a translation from this custom localization or Localization.Translate.
Searches with the user language with a fallback to English. |
Extension Methods