Table of Contents

Class LanguageHandler

Namespace
Nautilus.Handlers
Assembly
Nautilus.dll
A handler class for adding or modifying language lines.
public static class LanguageHandler
Inheritance
LanguageHandler
Inherited Members

Methods

RegisterLocalization(string, Dictionary<string, string>)

Registers language entries for a specific language.
public static void RegisterLocalization(string language, Dictionary<string, string> languageStrings)

Parameters

language string
The language to register the entries to.
languageStrings Dictionary<string, string>
The language entries to register.

RegisterLocalizationFolder(string)

Registers a folder path as a Multi-Language json files folder.

Please make sure that the passed folder contains json files that are properly named after the language each json file localizes.
public static void RegisterLocalizationFolder(string languageFolderName = "Localization")

Parameters

languageFolderName string
the folder name. This folder is expected to be found at ModFolder/languageFolderName.

SetLanguageLine(string, string, string)

Allows you to define a language entry into the game.
public static void SetLanguageLine(string lineId, string text, string language = "English")

Parameters

lineId string
The ID of the entry, this is what is used to get the actual text.
text string
The actual text related to the entry.
language string
The language for this specific entry. Defaults to English.

SetTechTypeName(TechType, string, string)

Allows you to set the display name of a specific TechType.
public static void SetTechTypeName(TechType techType, string text, string language = "English")

Parameters

techType TechType
The TechType whose display name that is to be changed.
text string
The new display name for the chosen TechType.
language string
The language for this entry. Defaults to English.

SetTechTypeTooltip(TechType, string, string)

Allows you to set the tooltip of a specific TechType.
public static void SetTechTypeTooltip(TechType techType, string text, string language = "English")

Parameters

techType TechType
The TechType whose tooltip that is to be changed.
text string
The new tooltip for the chosen TechType.
language string
The language for this entry. Defaults to English.