diff --git a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java index 0ccfecbc..988fd6d5 100755 --- a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java @@ -22,7 +22,8 @@ public final class LocaleUtils { final String lang = LocaleUtils.getCorrespondingLanguageCode(baseContext); - currentLocale = TextUtils.isEmpty(lang) ? defaultLocale : new Locale(lang); + currentLocale = TextUtils.isEmpty(lang) ? defaultLocale : + (lang.contains("_") ? new Locale(lang.split("_")[0], lang.split("_")[1]) : new Locale(lang)); Locale.setDefault(currentLocale); final Resources res = baseContext.getResources(); @@ -62,7 +63,7 @@ public final class LocaleUtils { if (appLanguageIndex == 1) return "en"; if (appLanguageIndex == 2) return "fr"; if (appLanguageIndex == 3) return "es"; - if (appLanguageIndex == 4) return "zh-rCN"; + if (appLanguageIndex == 4) return "zh_CN"; if (appLanguageIndex == 5) return "in"; if (appLanguageIndex == 6) return "it"; if (appLanguageIndex == 7) return "de"; @@ -72,7 +73,7 @@ public final class LocaleUtils { if (appLanguageIndex == 11) return "fa"; if (appLanguageIndex == 12) return "mk"; if (appLanguageIndex == 13) return "vi"; - if (appLanguageIndex == 14) return "zh-rTW"; + if (appLanguageIndex == 14) return "zh_TW"; if (appLanguageIndex == 15) return "hi"; if (appLanguageIndex == 16) return "cs";