public final class LM extends Object
Language provided by languageSupplier.
To gain access to multiple languages simultaneously use separate Language instances.LanguageManager,
Language| Modifier and Type | Field and Description |
|---|---|
static Object[] |
emptyData
Empty language data.
|
| Constructor and Description |
|---|
LM() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(String key)
Returns whether or not specified language key exists in default
Language. |
static boolean |
containsText(String key)
Returns whether or not at least single
Text exists for specified language key. |
static boolean |
containsText(String key,
String state)
Returns whether or not at least single
Text exists for specified language key and state. |
static String |
get(String key,
Object... data)
Returns text for the specified language key from this
Language. |
static Language |
getLanguage()
Returns specific
Language instance currently used by this bridge class. |
static Supplier<Language> |
getLanguageSupplier()
|
static Locale |
getLocale()
|
static int |
getMnemonic(String key)
Returns mnemonic for the specified language key from this
Language. |
static int |
getMnemonic(String key,
String state)
Returns mnemonic for the specified language key from this
Language. |
static String |
getState(String key,
String state,
Object... data)
Returns text for the specified language key and state from this
Language. |
static void |
setLanguageSupplier(Supplier<Language> supplier)
|
@NotNull public static Language getLanguage()
Language instance currently used by this bridge class.Language instance currently used by this bridge class@NotNull public static String get(@Nullable String key, @NotNull Object... data)
Language.key - language key to retrieve text fordata - language dataLanguage@NotNull public static String getState(@Nullable String key, @Nullable String state, @NotNull Object... data)
Language.public static int getMnemonic(@Nullable String key)
Language.key - language key to retrieve mnemonic forLanguagepublic static int getMnemonic(@Nullable String key, @Nullable String state)
Language.public static boolean contains(@Nullable String key)
Language.
This will basically check existence of at least single Record with the specified key in default Language.key - language key to checktrue if specified language key exists in default Language, false otherwisepublic static boolean containsText(@Nullable String key)
Text exists for specified language key.key - language key to checktrue if at least single Text exists for specified language key, false otherwiseCopyright © 2020. All rights reserved.