Enum Class Language

java.lang.Object
java.lang.Enum<Language>
us.teaminceptus.novaconomy.api.Language
All Implemented Interfaces:
Serializable, Comparable<Language>, Constable

public enum Language extends Enum<Language>
Represents a Language supported by Novaconomy
  • Enum Constant Details

    • ENGLISH

      public static final Language ENGLISH
      Represents English (No Identifier)
    • SPANISH

      public static final Language SPANISH
      Represents Spanish / Español
    • FRENCH

      public static final Language FRENCH
      Represents French / Français
    • GERMAN

      public static final Language GERMAN
      Represents German / Deutsch
    • PORTUGUESE

      public static final Language PORTUGUESE
      Represents Portuguese / Português
    • JAPANESE

      public static final Language JAPANESE
      Represents Japanese / 日本
    • CHINESE

      public static final Language CHINESE
      Represents Chinese Simplified / 中国人
    • ITALIAN

      public static final Language ITALIAN
      Represents Italian / Italiano
    • SWEDISH

      public static final Language SWEDISH
      Represents Swedish / Svenska
    • NORWEGIAN_BOKMAL

      public static final Language NORWEGIAN_BOKMAL
      Represents Norwegain Bokmål / Norsk Bokmål
    • FINNISH

      public static final Language FINNISH
      Represents Finnish / Suomi
    • KOREAN

      public static final Language KOREAN
      Represents Korean / 한국어
    • INDONESIAN

      public static final Language INDONESIAN
      Represents Indonesian / Indonesia
    • RUSSIAN

      public static final Language RUSSIAN
      Represents Russian / Русский
  • Method Details

    • values

      public static Language[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Language valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getIdentifier

      @NotNull public @NotNull String getIdentifier()
      Fetches the Identifier of this Language.
      Returns:
      Identifier
    • getLocale

      @NotNull public @NotNull Locale getLocale()
      Fetches the Locale belonging to this Language.
      Returns:
      Locale
    • getMessage

      public String getMessage(String key)
      Fetches the Message of this Language.
      Parameters:
      key - Key to fetch
      Returns:
      Message for this language
    • getById

      @NotNull public static @NotNull Language getById(@NotNull @NotNull String id)
      Fetches a Language by its identifier.
      Parameters:
      id - ID to fetch (e.g. "es" for Spanish)
      Returns:
      Found language, or English if not found
    • getCurrentLanguage

      @NotNull public static @NotNull Language getCurrentLanguage()
      Fetches the current Language for Novaconomy.
      Returns:
      Current Language
    • getCurrentMessage

      public static String getCurrentMessage(@NotNull @NotNull String key)
      Fetches a message in the current language.
      Parameters:
      key - Key to fetch
      Returns:
      Message in the current language
    • getCurrentLocale

      @NotNull public static @NotNull Locale getCurrentLocale()
      Fetches the locale for the current language.
      Returns:
      Current Locale