Enum Class Language

java.lang.Object
java.lang.Enum<Language>
valorless.valorlessutils.translate.Language
All Implemented Interfaces:
Serializable, Comparable<Language>, Constable

public enum Language extends Enum<Language>
Enum representing supported languages for translation.
  • Enum Constant Details

    • DA_DK

      public static final Language DA_DK
    • DE_DE

      public static final Language DE_DE
    • EN_GB

      public static final Language EN_GB
    • EN_PT

      public static final Language EN_PT
    • EN_US

      public static final Language EN_US
    • ES_ES

      public static final Language ES_ES
    • FR_FR

      public static final Language FR_FR
    • JA_JP

      public static final Language JA_JP
    • KO_KR

      public static final Language KO_KR
    • NL_NL

      public static final Language NL_NL
    • PL_PL

      public static final Language PL_PL
    • PT_BR

      public static final Language PT_BR
    • PT_PT

      public static final Language PT_PT
    • RU_RU

      public static final Language RU_RU
    • TR_TR

      public static final Language TR_TR
    • ZH_CN

      public static final Language ZH_CN
  • 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
    • getCode

      public String getCode()
      Returns the language code (e.g., "en_us").
      Returns:
      the language code
    • getLang

      public String getLang()
      Returns the language name (e.g., "English").
      Returns:
      the language name
    • toString

      public String toString()
      Returns a string representation of the Language enum constant.
      Overrides:
      toString in class Enum<Language>
      Returns:
      a string in the format "Language{code='code', lang='lang'}"
    • getLanguage

      @NotNull public static Language getLanguage(String code)
      Returns the Language enum constant corresponding to the given language code.
      Parameters:
      code - the language code (e.g., "en_us")
      Returns:
      the corresponding Language enum constant, or Language.EN_US if the code is not found