Package net.kyori.adventure.translation
Interface Translator
- All Known Subinterfaces:
- GlobalTranslator,- TranslationRegistry
public interface Translator
A message format translator.
- Since:
- 4.0.0
- 
Method SummaryModifier and Type Method Description @NonNull Keyname()A key identifying this translation source.static @Nullable LocaleparseLocale(@NonNull String string)@Nullable MessageFormattranslate(@NonNull String key, @NonNull Locale locale)Gets a message format from a key and locale.
- 
Method Details- 
parseLocale- Parameters:
- string- the string
- Returns:
- a locale
- Since:
- 4.0.0
 
- 
name@NonNull Key name()A key identifying this translation source.Intended to be used for display to users. - Returns:
- an identifier for this translation source
- Since:
- 4.0.0
 
- 
translateGets a message format from a key and locale.- Parameters:
- locale- a locale
- key- a translation key
- Returns:
- a message format or nullto skip translation
- Since:
- 4.0.0
 
 
-