Class Translatable

java.lang.Object
net.hectus.lang.Translatable

public abstract class Translatable extends Object
Easy abstract class for making every translatable class organized into the same translation methods.
  • Constructor Details

    • Translatable

      public Translatable()
  • Method Details

    • getTranslated

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

      public net.kyori.adventure.text.Component getTranslatedComponent(Locale locale)
      Translated the class based on the user's locale and outputs it as a adventure api Component.
      Parameters:
      locale - The user's locale which will be translated to.
      Returns:
      The translated result as a component.