Package dev.booky.cloudcore.i18n
Class CloudTranslator
java.lang.Object
dev.booky.cloudcore.i18n.CloudTranslator
- All Implemented Interfaces:
net.kyori.adventure.translation.Translator
public final class CloudTranslator
extends Object
implements net.kyori.adventure.translation.Translator
-
Constructor Summary
ConstructorsConstructorDescriptionCloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Collection<Locale> locales) CloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Locale... locales) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.util.TriStatevoidload()@NotNull net.kyori.adventure.key.Keyname()@Nullable MessageFormat@Nullable net.kyori.adventure.text.Componenttranslate(@NotNull net.kyori.adventure.text.TranslatableComponent component, @NotNull Locale locale) voidunload()
-
Constructor Details
-
CloudTranslator
public CloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Locale... locales) -
CloudTranslator
public CloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Collection<Locale> locales)
-
-
Method Details
-
unload
public void unload() -
load
public void load() -
name
@NotNull public @NotNull net.kyori.adventure.key.Key name()- Specified by:
namein interfacenet.kyori.adventure.translation.Translator
-
hasAnyTranslations
@NotNull public @NotNull net.kyori.adventure.util.TriState hasAnyTranslations()- Specified by:
hasAnyTranslationsin interfacenet.kyori.adventure.translation.Translator
-
translate
@Nullable public @Nullable MessageFormat translate(@NotNull @NotNull String key, @NotNull @NotNull Locale locale) - Specified by:
translatein interfacenet.kyori.adventure.translation.Translator
-
translate
@Nullable public @Nullable net.kyori.adventure.text.Component translate(@NotNull @NotNull net.kyori.adventure.text.TranslatableComponent component, @NotNull @NotNull Locale locale) - Specified by:
translatein interfacenet.kyori.adventure.translation.Translator
-