Class Translation
java.lang.Object
com.palmergames.bukkit.towny.object.Translation
A convenience object to facilitate translation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic Localestatic Localestatic LocalegetLocale(org.bukkit.command.CommandSender sender) static LocalegetLocaleOffline(@NotNull org.bukkit.OfflinePlayer offlinePlayer) static booleanhasTranslation(@NotNull String key, @NotNull Locale locale) static voidstatic StringTranslates given key into the default Locale.static Stringstatic Stringstatic StringTranslates given key into the default Locale.static StringTranslates given key into the given locale.static StringTranslates given key into the given locale.static Stringstatic Stringprotected static voidstatic Localestatic StringtranslateTranslatables(org.bukkit.command.CommandSender sender, Translatable... translatables) static StringtranslateTranslatables(org.bukkit.command.CommandSender sender, String delimiter, Translatable... translatables)
-
Method Details
-
loadTranslationRegistry
public static void loadTranslationRegistry() -
of
Translates given key into the default Locale.- Parameters:
key- The language key.- Returns:
- The localized string.
-
of
Translates given key into the default Locale.- Parameters:
key- The language key.args- The arguments to format the localized string.- Returns:
- The localized string.
-
of
Translates given key into the given locale.- Parameters:
key- The language key.locale- Locale to translate to.- Returns:
- The localized string.
-
of
Translates given key into the given locale.- Parameters:
key- The language key.locale- Locale to translate to.args- The arguments to format the localized string.- Returns:
- The localized string.
-
of
-
of
-
of
-
of
-
toLocale
-
setDefaultLocale
protected static void setDefaultLocale() -
getDefaultLocale
-
translateTranslatables
public static String translateTranslatables(org.bukkit.command.CommandSender sender, Translatable... translatables) -
translateTranslatables
public static String translateTranslatables(org.bukkit.command.CommandSender sender, String delimiter, Translatable... translatables) -
getLocale
-
getLocaleOffline
-
getLocale
-
addTranslations
-
hasTranslation
- Parameters:
key- The key to check forlocale- The language- Returns:
- Whether the language has a translation for the given key
- Since:
- 0.99.5.20
-