Package emu.grasscutter.utils
Class Language
java.lang.Object
emu.grasscutter.utils.Language
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturns the value (as a string) from a nested key.static LanguagegetLanguage(String langCode) Creates a language instance from a code.get language codestatic Language.TextStringsgetTextMapKey(int key) static Language.TextStringsgetTextMapKey(long hash) static it.unimi.dsi.fastutil.ints.Int2ObjectMap<Language.TextStrings>Deprecated, for removal: This API element is subject to removal in a future version.static voidstatic StringReturns the translated value from the key while substituting arguments.static StringReturns the translated value from the key while substituting arguments.
-
Method Details
-
getLanguage
Creates a language instance from a code.- Parameters:
langCode- The language code.- Returns:
- A language instance.
-
translate
Returns the translated value from the key while substituting arguments.- Parameters:
key- The key of the translated value to return.args- The arguments to substitute.- Returns:
- A translated value with arguments substituted.
-
translate
Returns the translated value from the key while substituting arguments.- Parameters:
player- Target playerkey- The key of the translated value to return.args- The arguments to substitute.- Returns:
- A translated value with arguments substituted.
-
getLanguageCode
get language code -
get
Returns the value (as a string) from a nested key.- Parameters:
key- The key to look for.- Returns:
- The value (as a string) from a nested key.
-
getTextMapStrings
@Deprecated(forRemoval=true) public static it.unimi.dsi.fastutil.ints.Int2ObjectMap<Language.TextStrings> getTextMapStrings()Deprecated, for removal: This API element is subject to removal in a future version. -
getTextMapKey
-
getTextMapKey
-
loadTextMaps
public static void loadTextMaps()
-