mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix: norwegian locale handling (#4716)
This commit is contained in:
parent
a9300fb1ab
commit
6884a0f7db
1 changed files with 7 additions and 0 deletions
|
@ -259,6 +259,13 @@ public class GeyserLocale {
|
||||||
// Invalid locale
|
// Invalid locale
|
||||||
return locale;
|
return locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes - covers the special case that is norwegian
|
||||||
|
String lowerCaseLocale = locale.toLowerCase(Locale.ROOT);
|
||||||
|
if (lowerCaseLocale.equals("nn_no") || lowerCaseLocale.equals("no_no")) {
|
||||||
|
locale = "nb_NO";
|
||||||
|
}
|
||||||
|
|
||||||
String language = locale.substring(0, 2);
|
String language = locale.substring(0, 2);
|
||||||
String country = locale.substring(3);
|
String country = locale.substring(3);
|
||||||
return language.toLowerCase(Locale.ENGLISH) + "_" + country.toUpperCase(Locale.ENGLISH);
|
return language.toLowerCase(Locale.ENGLISH) + "_" + country.toUpperCase(Locale.ENGLISH);
|
||||||
|
|
Loading…
Reference in a new issue