Skip to content

Commit

Permalink
AppSettings: Added Arabic to language switch
Browse files Browse the repository at this point in the history
Signed-off-by: sunilpaulmathew <[email protected]>
  • Loading branch information
sunilpaulmathew committed Dec 12, 2022
1 parent 5e317dc commit 2cc6a06
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public static String getLanguage(Activity activity) {
return activity.getString(R.string.language_pl);
case "it":
return activity.getString(R.string.language_it);
case "ar":
return activity.getString(R.string.language_ar);
default:
return activity.getString(R.string.language_default) + " (" + java.util.Locale.getDefault().getLanguage() + ")";
}
Expand Down Expand Up @@ -197,7 +199,8 @@ private static String[] getLanguageMenu(Context context) {
context.getString(R.string.language_zh),
context.getString(R.string.language_hu),
context.getString(R.string.language_pl),
context.getString(R.string.language_it)
context.getString(R.string.language_it),
context.getString(R.string.language_ar)
};
}

Expand Down Expand Up @@ -322,6 +325,12 @@ public void onItemSelected(int position) {
Utils.restartApp(activity);
}
break;
case 19:
if (!sUtils.getLanguage(activity).equals("ar")) {
sUtils.saveString("appLanguage", "ar", activity);
Utils.restartApp(activity);
}
break;
}
}
}.show();
Expand Down

0 comments on commit 2cc6a06

Please sign in to comment.