Package dev.demeng.pluginbase.locale
Class Locales
java.lang.Object
dev.demeng.pluginbase.locale.Locales
An enum-like class for packing all available locales supported by the framework.
Due to the fact that Locale does not define all locales, additional ones are added.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Localestatic final Locale -
Method Summary
-
Field Details
-
ENGLISH
-
GERMAN
-
FRENCH
-
JAPANESE
-
ITALIAN
-
KOREAN
-
CHINESE
-
SIMPLIFIED_CHINESE
-
TRADITIONAL_CHINESE
-
SPANISH
-
DUTCH
-
DANISH
-
CZECH
-
GREEK
-
LATIN
-
BULGARIAN
-
AFRIKAANS
-
HINDI
-
HEBREW
-
POLISH
-
PORTUGUESE
-
FINNISH
-
SWEDISH
-
RUSSIAN
-
ROMANIAN
-
VIETNAMESE
-
THAI
-
TURKISH
-
UKRANIAN
-
ARABIC
-
WELSH
-
NORWEGIAN_BOKMAAL
-
NORWEGIAN_NYNORSK
-
HUNGARIAN
-
-
Method Details
-
get
Returns the locale that matches the given language string. Handles case-insensitive matching and Minecraft client locale formats (e.g., "en_us", "pt_br", "zh_cn"). If no exact match is found, falls back to the base language (e.g., "en_GB" falls back to "en").get("en") -> ENGLISH
get("fr") -> FRENCH
get("zh_cn") -> SIMPLIFIED_CHINESE
get("en_gb") -> ENGLISH (hierarchical fallback)- Parameters:
language- Language to get locale for- Returns:
- The locale, or null if not found.
-
getLocales
Returns all the locales in this class- Returns:
- All locales
-