Show / Hide Table of Contents

Class LocalizationManager

Manager for handling localizations for all custom content added to the game.
Inheritance
object
LocalizationManager
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public class LocalizationManager

Fields

Name Description
CommunityTranslationFileName Name of the community translation files that will be the first custom languages files loaded before any others.
DefaultLanguage Default language of the game.
TokenFirstChar Your token must start with this character.
TranslationsFolderName Name of the folder that will hold the custom .json translations files.

Properties

Name Description
Instance The singleton instance of this manager.

Methods

Name Description
AddLocalization(CustomLocalization) Add your mod's custom localization. Only one CustomLocalization can be added per mod.
GetLocalization() Get the CustomLocalization for your mod. Creates a new CustomLocalization if no localization was added before.
TryTranslate(string) Retrieve a translation if it's found in any CustomLocalization or Localization.Translate.

Events

Name Description
OnLocalizationAdded Event that gets fired after all custom localization has been added to the game. Use this event if you need to translate strings using the vanilla Localization class. Your code will execute every time the localization gets reset (on every menu start). If you want to execute just once you will need to unregister from the event after execution.

Extension Methods

PrefabExtension.FixReferences(object)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾