diff --git a/README.md b/README.md
index 10b60bf..1ebcd95 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,9 @@ Sometimes I add new posts about this project [on my blog page](https://developer
* Czech by [Spenaat](https://github.com/spenaat)
* Arabic by [eslamabdel](https://github.com/eslamabdel)
* Romanian by [Călin Ilie](https://github.com/calini)
-* Swedish by [Daniel Nylander](https://github.com/yeager) - (coming soon)
+* Swedish by [Daniel Nylander](https://github.com/yeager)
+* Japanese by [kuragehime](https://github.com/kuragehimekurara1)
+* Ryukyuan languages by [kuragehime](https://github.com/kuragehimekurara1)
### System requirements
@@ -71,7 +73,7 @@ JDK 11 for MacOS and Linux
| v0.6.1 | v0.6 |
| v0.7 - 0.7.3 | v0.7+ |
| v0.8 - 0.9 | v1.0+ |
-| v0.10 | v6.0 |
+| v0.10 | v6.0+ |
where '+' means 'any next NS-USBloader version'.
diff --git a/pom.xml b/pom.xml
index 41d434a..b3c4607 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
NS-USBloader
ns-usbloader
- 6.1
+ 6.2
https://redrise.ru
diff --git a/src/main/java/nsusbloader/AppPreferences.java b/src/main/java/nsusbloader/AppPreferences.java
index 7fb69dd..363f9ba 100644
--- a/src/main/java/nsusbloader/AppPreferences.java
+++ b/src/main/java/nsusbloader/AppPreferences.java
@@ -32,7 +32,7 @@ public class AppPreferences {
private AppPreferences(){
this.preferences = Preferences.userRoot().node("NS-USBloader");
String localeCode = preferences.get("locale", Locale.getDefault().toString());
- this.locale = new Locale(localeCode.substring(0, 2), localeCode.substring(3, 5));
+ this.locale = new Locale(localeCode.substring(0, 2), localeCode.substring(3));
}
public String getTheme(){
diff --git a/src/main/java/nsusbloader/UI/LocaleHolder.java b/src/main/java/nsusbloader/UI/LocaleHolder.java
index 5095ded..f1b2319 100644
--- a/src/main/java/nsusbloader/UI/LocaleHolder.java
+++ b/src/main/java/nsusbloader/UI/LocaleHolder.java
@@ -1,5 +1,5 @@
/*
- Copyright 2019-2020 Dmitry Isaenko
+ Copyright 2019-2022 Dmitry Isaenko
This file is part of NS-USBloader.
@@ -26,16 +26,14 @@ public class LocaleHolder {
private final String localeCode;
private final String languageName;
- public LocaleHolder(Locale locale){
- this.locale = locale;
- this.localeCode = locale.toString();
- this.languageName = locale.getDisplayLanguage(locale) + " (" + locale + ")";
- }
-
public LocaleHolder(String localeFileName) {
- String country = localeFileName.substring(7, 9);
- String language = localeFileName.substring(10, 12);
- this.locale = new Locale(country, language);
+ String language = localeFileName.substring(7, 9);
+ String country;
+ if (localeFileName.length() > 23) // ISO 639-3 not supported by Java
+ country = localeFileName.substring(10, localeFileName.indexOf('.'));
+ else // ISO 639-1
+ country = localeFileName.substring(10, 12);
+ this.locale = new Locale(language, country);
this.localeCode = locale.toString();
this.languageName = locale.getDisplayLanguage(locale) + " (" + locale + ")";
}
@@ -47,7 +45,7 @@ public class LocaleHolder {
public String getLocaleCode(){
return localeCode;
- };
+ }
public Locale getLocale() {
return locale;
diff --git a/src/main/resources/locale_ja_ryu.properties b/src/main/resources/locale_ja_RYU.properties
similarity index 100%
rename from src/main/resources/locale_ja_ryu.properties
rename to src/main/resources/locale_ja_RYU.properties