Package emu.grasscutter.utils
Class Language
java.lang.Object
emu.grasscutter.utils.Language
-
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 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.
-