Interface Translation

All Known Subinterfaces:
MessageFormatTranslation, TextTranslation

public interface Translation
Represents a translation from a given translation system.
  • Method Details

    • format

      String format(TranslationArguments parameters)
      Formats the translation with the given parameters and return a string.
      Parameters:
      parameters - the translation parameters
      Returns:
      the formatted translation as a string
    • formatAsComponent

      default Component formatAsComponent(TranslationArguments parameters)
      Formats the translation with the given parameters and return a component.
      Parameters:
      parameters - the translation parameters
      Returns:
      the formatted translation as a component
    • formatTo

      @Deprecated(since="4.1", forRemoval=true) default void formatTo(TranslationArguments parameters, ComponentStringBuilder builder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method has been replaced by formatAsComponent(TranslationArguments).
      Formats the translation to the given ComponentStringBuilder.
      Parameters:
      parameters - the translation parameters
      builder - the builder