TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GetLocalizationKey()

string Terraria.ModLoader.Mod.GetLocalizationKey ( string suffix)
inlineinherited

Creates a localization key following the pattern of "Mods.{ModName}.{suffix}". Use this with M:Terraria.Localization.Language.GetOrRegister(System.String,System.Func<System.String>) to retrieve a T:Terraria.Localization.LocalizedText for custom localization keys. Alternatively M:Terraria.ModLoader.Mod.GetLocalization(System.String,System.Func<System.String>) can be used directly instead. Custom localization keys need to be registered during the mod loading process to appear automtaically in the localization files.

Parameters
suffix
Returns

Definition at line 233 of file Mod.cs.

234 {
235 return "Mods." + Name + "." + suffix;
236 }
virtual string Name
Stores the name of the mod. This name serves as the mod's identification, and also helps with saving ...
Definition Mod.cs:66

References Terraria.ModLoader.Mod.Name.

Referenced by Terraria.ModLoader.Mod.GetLocalization(), Terraria.Localization.Language.GetOrRegister(), and Terraria.ModLoader.NPCLoader.RegisterTownNPCMoodLocalizations().

+ Here is the caller graph for this function: