tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.ModLoader.LocalizationLoader Class Reference

Static Public Member Functions

static void AddTranslation (ModTranslation translation)
 Adds a ModTranslation to the game so that you can use Language.GetText to get a LocalizedText. More...
 
static ModTranslation CreateTranslation (Mod mod, string key)
 Creates a ModTranslation object using the provided mod for a prefix to the key. You can use the resulting object in AddTranslation. More...
 
static ModTranslation CreateTranslation (string key)
 Creates a ModTranslation object using the provided full key. You can use the resulting object in AddTranslation. More...
 
static void RefreshModLanguage (GameCulture culture)
 

Member Function Documentation

◆ AddTranslation()

static void Terraria.ModLoader.LocalizationLoader.AddTranslation ( ModTranslation  translation)
static

Adds a ModTranslation to the game so that you can use Language.GetText to get a LocalizedText.

◆ CreateTranslation() [1/2]

static ModTranslation Terraria.ModLoader.LocalizationLoader.CreateTranslation ( Mod  mod,
string  key 
)
static

Creates a ModTranslation object using the provided mod for a prefix to the key. You can use the resulting object in AddTranslation.

Parameters
modThe mod that this translation is for.
keyThe key for the ModTranslation. The full key will be 'Mods.{mod .Name}.{key }'.

◆ CreateTranslation() [2/2]

static ModTranslation Terraria.ModLoader.LocalizationLoader.CreateTranslation ( string  key)
static

Creates a ModTranslation object using the provided full key. You can use the resulting object in AddTranslation.

Parameters
keyThe full key for the ModTranslation.