diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java
index 22c2af23d..89f3ece18 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java
@@ -1857,8 +1857,16 @@ public class GBApplication extends Application {
public static void setLanguage(String lang) {
if (lang.equals("default")) {
language = Resources.getSystem().getConfiguration().locale;
- } else {
+ } else if (lang.length() == 2) {
language = new Locale(lang);
+ } else {
+ final String[] split = lang.split("_");
+ if (split.length == 2) {
+ language = new Locale(split[0], split[1]);
+ } else {
+ // Unexpected format, fallback to system default
+ language = Resources.getSystem().getConfiguration().locale;
+ }
}
updateLanguage(language);
}
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 2362342e3..1621c8895 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -17,44 +17,107 @@
- @string/pref_theme_value_dynamic
+
- System Default
+ - Bahasa Indonesia
- Català
- Čeština
- Deutsch
+ - Eesti
- English
+ - English (United Kingdom)
- Español
+ - Euskara
- Français
+ - Français (Canadien)
+ - Galego
+ - Hrvatski
+ - Interlingua
+ - Italiano
+ - Latviešu
+ - Lietuvių
+ - Magyar
+ - Myanmasa
+ - Nederlands
+ - Norsk (bokmål)
- Polski
- Português
- - Русский
+ - Português (Brasil)
+ - Română
+ - Slovenčina
+ - Suomi
+ - Svenska
- Tiếng Việt
- Türkçe
+ - Ελληνικά
+ - Български
+ - Русский
+ - Српски
- Українська
+ - ქართული
+ - עברית
+ - العربية
+ - فارسی
+ - हिन्दी
+ - தமிழ்
+ - മലയാളം
+ - ไทย / Phasa Thai
- 한국어
- 日本語
- - Magyar
- - Slovenčina
+ - 简体中文
+ - 繁體中文
- default
+ - id
- ca
- cs
- de
+ - et
- en
+ - en_GB
- es
+ - eu
- fr
+ - fr_CA
+ - gl
+ - hr
+ - ia
+ - it
+ - lv
+ - lt
+ - hu
+ - my
+ - nl
+ - nb_NO
- pl
- pt
- - ru
+ - pt_BR
+ - ro
+ - sk
+ - fi
+ - sv
- vi
- tr
+ - el
+ - bg
+ - ru
+ - sr
- uk
+ - ka
+ - he
+ - ar
+ - fa
+ - hi
+ - ta
+ - ml
+ - th
- ko
- ja
- - hu
- - sk
+ - zh_CN
+ - zh_TW