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

◆ GetLocalization()

LocalizedText Terraria.ModLoader.Mod.GetLocalization ( string suffix,
Func< string > makeDefaultValue = null )
inlineinherited

Returns a T:Terraria.Localization.LocalizedText for this Mod with the provided suffix . The suffix will be used to generate a key by providing it to M:Terraria.ModLoader.Mod.GetLocalizationKey(System.String).
If no existing localization exists for the key, it will be defined so it can be exported to a matching mod localization file.

Parameters
suffix
makeDefaultValueA factory method for creating the default value, used to update localization files with missing entries
Returns

Definition at line 245 of file Mod.cs.

246 {
248 }
static LocalizedText GetOrRegister(string key, Func< string > makeDefaultValue=null)
Returns a T:Terraria.Localization.LocalizedText for a given key. If no existing localization exists ...
Definition Language.cs:124
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
string GetLocalizationKey(string suffix)
Creates a localization key following the pattern of "Mods.{ModName}.{suffix}". Use this with M:Terrar...
Definition Mod.cs:233

References Terraria.ModLoader.Mod.GetLocalizationKey(), and Terraria.Localization.Language.GetOrRegister().

+ Here is the call graph for this function: