Package us.teaminceptus.novaconomy.api
Enum Class Language
- All Implemented Interfaces:
Serializable,Comparable<Language>,Constable
Represents a Language supported by Novaconomy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents Chinese Simplified / 中国人Represents English (No Identifier)Represents Finnish / SuomiRepresents French / FrançaisRepresents German / DeutschRepresents Indonesian / IndonesiaRepresents Italian / ItalianoRepresents Japanese / 日本Represents Korean / 한국어Represents Norwegain Bokmål / Norsk BokmålRepresents Portuguese / PortuguêsRepresents Russian / РусскийRepresents Spanish / EspañolRepresents Swedish / Svenska -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull LanguageFetches a Language by its identifier.static @NotNull LanguageFetches the current Language for Novaconomy.static @NotNull LocaleFetches the locale for the current language.static StringgetCurrentMessage(@NotNull String key) Fetches a message in the current language.@NotNull StringFetches the Identifier of this Language.@NotNull LocaleFetches the Locale belonging to this Language.getMessage(String key) Fetches the Message of this Language.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
-
ENGLISH
Represents English (No Identifier) -
SPANISH
Represents Spanish / Español -
FRENCH
Represents French / Français -
GERMAN
Represents German / Deutsch -
PORTUGUESE
Represents Portuguese / Português -
JAPANESE
Represents Japanese / 日本 -
CHINESE
Represents Chinese Simplified / 中国人 -
ITALIAN
Represents Italian / Italiano -
SWEDISH
Represents Swedish / Svenska -
NORWEGIAN_BOKMAL
Represents Norwegain Bokmål / Norsk Bokmål -
FINNISH
Represents Finnish / Suomi -
KOREAN
Represents Korean / 한국어 -
INDONESIAN
Represents Indonesian / Indonesia -
RUSSIAN
Represents Russian / Русский
-
-
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
-
getIdentifier
Fetches the Identifier of this Language.- Returns:
- Identifier
-
getLocale
Fetches the Locale belonging to this Language.- Returns:
- Locale
-
getMessage
Fetches the Message of this Language.- Parameters:
key- Key to fetch- Returns:
- Message for this language
-
getById
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
Fetches the current Language for Novaconomy.- Returns:
- Current Language
-
getCurrentMessage
Fetches a message in the current language.- Parameters:
key- Key to fetch- Returns:
- Message in the current language
-
getCurrentLocale
Fetches the locale for the current language.- Returns:
- Current Locale
-