Skip to content

Commit

Permalink
Fix: Traditional chineese issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanth committed May 18, 2021
1 parent 584be31 commit fc30dc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
//applicationId "dev.ukanth.ufirewall.donate"
minSdkVersion 21
targetSdkVersion 30
versionCode 20210516
versionName "3.5.2"
versionCode 20210517
versionName "3.5.3-BETA"
//buildConfigField 'boolean', 'DONATE', 'true'
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/dev/ukanth/ufirewall/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -3698,6 +3698,13 @@ public static boolean isAFWallAllowed(Context context) {
public static Context updateBaseContextLocale(Context context) {
String language = G.locale(); // Helper method to get saved language from SharedPreferences
Locale locale = new Locale(language);

if (language.equals("zh_CN")) {
locale = Locale.SIMPLIFIED_CHINESE;
} else if (language.equals("zh_TW")) {
locale = Locale.TRADITIONAL_CHINESE;
}

Locale.setDefault(locale);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
return updateResourcesLocale(context, locale);
Expand Down

0 comments on commit fc30dc2

Please sign in to comment.