public class LanguageUtils extends Object
| Constructor and Description |
|---|
LanguageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatLocale(String locale)
Cleans up and formats a locale string
|
static String |
getDefaultLocale()
Get the default locale that Geyser should use
|
static String |
getLocaleStringLog(String key,
Object... values)
Get a formatted language string with the default locale for Geyser
|
static String |
getPlayerLocaleString(String key,
String locale,
Object... values)
Get a formatted language string with the given locale for Geyser
|
static void |
init() |
static void |
loadGeyserLocale(String locale)
Loads a Geyser locale from resources, if the file doesn't exist it just logs a warning
|
public static void loadGeyserLocale(String locale)
locale - Locale to loadpublic static String getLocaleStringLog(String key, Object... values)
key - Language string to translatevalues - Values to put into the stringpublic static String getPlayerLocaleString(String key, String locale, Object... values)
key - Language string to translatelocale - Locale to translate tovalues - Values to put into the stringpublic static String formatLocale(String locale)
locale - The locale to formatpublic static String getDefaultLocale()
public static void init()
Copyright © 2020 GeyserMC. All rights reserved.