Commit 0690e231 authored by lhhxxxxx's avatar lhhxxxxx Committed by GitHub
Browse files

Handle with undetermined locale language config (#611)

* Update GiveAllCommand.java

giveall command nomore give arts

* Update Grasscutter.java

* Update Grasscutter.java
parent 557e641f
......@@ -149,7 +149,13 @@ public final class Grasscutter {
public static void loadLanguage() {
var locale = config.LocaleLanguage;
language = Language.getLanguage(locale.toLanguageTag());
String languageTag = locale.toLanguageTag();
if (languageTag.equals("und")) {
Grasscutter.getLogger().error("Illegal locale language, using en-US instead.");
language = Language.getLanguage("en-US");
} else {
language = Language.getLanguage(languageTag);
}
}
public static void saveConfig() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment