Package com.ldtteam.structurize.util
Class LanguageHandler
java.lang.Object
com.ldtteam.structurize.util.LanguageHandler
Helper class for localization and sending player messages.
Note that MineColonies is still using some of these, so it's not safe to delete yet.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringLocalize a string and use String.format().static voidloadLangPath(String path) static voidSets our cache to use mc default one.static StringtranslateKey(String key) Translates key to readable string.static StringtranslateKeyWithFormat(String key, Object... format) Translates key to readable string and formats it.
-
Method Details
-
format
Localize a string and use String.format().- Parameters:
inputKey- translation key.args- Objects for String.format().- Returns:
- Localized string.
-
translateKeyWithFormat
Translates key to readable string and formats it.- Parameters:
key- translation keyformat- String.format() attributes- Returns:
- formatted string
-
translateKey
Translates key to readable string.- Parameters:
key- translation key- Returns:
- readable string
-
setMClanguageLoaded
public static void setMClanguageLoaded()Sets our cache to use mc default one. -
loadLangPath
-