Enum Class Language
- All Implemented Interfaces:
Serializable,Comparable<Language>,Constable
Enum representing supported languages for translation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the language code (e.g., "en_us").getLang()Returns the language name (e.g., "English").static LanguagegetLanguage(String code) Returns the Language enum constant corresponding to the given language code.toString()Returns a string representation of the Language enum constant.static LanguageReturns the enum constant of this class with the specified name.static Language[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DA_DK
-
DE_DE
-
EN_GB
-
EN_PT
-
EN_US
-
ES_ES
-
FR_FR
-
JA_JP
-
KO_KR
-
NL_NL
-
PL_PL
-
PT_BR
-
PT_PT
-
RU_RU
-
TR_TR
-
ZH_CN
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getCode
Returns the language code (e.g., "en_us").- Returns:
- the language code
-
getLang
Returns the language name (e.g., "English").- Returns:
- the language name
-
toString
Returns a string representation of the Language enum constant. -
getLanguage
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
-