Package com.earth2me.essentials
Class I18n
java.lang.Object
com.earth2me.essentials.I18n
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
capitalCase
(String input) Gets the current locale settingstatic Locale
static Object[]
mutateArgs
(Object[] objects, Function<Object, String> mutator) void
void
onEnable()
static String
Translates a message using the server's configured locale.static String
Translates a message using the provided locale.void
updateLocale
(String loc)
-
Constructor Details
-
I18n
-
-
Method Details
-
tlLiteral
Translates a message using the server's configured locale.- Parameters:
tlKey
- The translation key.objects
- Translation parameters, if applicable. Note: by default, these will not be parsed for MiniMessage.- Returns:
- The translated message.
- See Also:
-
tlLocale
Translates a message using the provided locale.- Parameters:
locale
- The locale to translate the key to.tlKey
- The translation key.objects
- Translation parameters, if applicable. Note: by default, these will not be parsed for MiniMessage.- Returns:
- The translated message.
- See Also:
-
capitalCase
-
onEnable
public void onEnable() -
onDisable
public void onDisable() -
getCurrentLocale
Description copied from interface:II18n
Gets the current locale setting- Specified by:
getCurrentLocale
in interfaceII18n
- Returns:
- the current locale, if not set it will return the default locale
-
mutateArgs
-
updateLocale
-
getLocale
-