Interface Translatable


public interface Translatable
Simple interface for making every translatable class organized into the same translation methods.
Since:
0.0.6
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    This is a secondary method to be used, if only one translation isn't enough.
    default net.kyori.adventure.text.Component
    This is a secondary method to be used, if only one translation isn't enough.
    Translates the class based on the given locale and outputs it as a String representation.
    default net.kyori.adventure.text.Component
    Translates the class based on the given locale and outputs it as an adventure api Component (TextComponent) representation.
  • Method Details

    • getTranslated

      String getTranslated(Locale locale)
      Translates the class based on the given locale and outputs it as a String representation.
      Parameters:
      locale - The locale which will be translated to.
      Returns:
      The translated result as a string.
    • getTranslatedComponent

      default net.kyori.adventure.text.Component getTranslatedComponent(Locale locale)
      Translates the class based on the given locale and outputs it as an adventure api Component (TextComponent) representation.
      Parameters:
      locale - The locale which will be translated to.
      Returns:
      The translated result as a string.
    • getSecondaryTranslated

      default String getSecondaryTranslated(Locale locale)
      This is a secondary method to be used, if only one translation isn't enough.
      Translates the class based on the given locale and outputs it as a String representation.
      Parameters:
      locale - The locale which will be translated to.
      Returns:
      The translated result as a string.
    • getSecondaryTranslatedComponent

      default net.kyori.adventure.text.Component getSecondaryTranslatedComponent(Locale locale)
      This is a secondary method to be used, if only one translation isn't enough.
      Translates the class based on the given locale and outputs it as an adventure api Component (TextComponent) representation.
      Parameters:
      locale - The locale which will be translated to.
      Returns:
      The translated result as a string.