From dce0fda67771774a15bebcc3075643c23d80d2dd Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 15 May 2022 14:38:42 +0200 Subject: [PATCH] Show language names using system locale --- app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 0eef3b1049..42f00792d8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -244,8 +244,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + Locale slocale = Resources.getSystem().getConfiguration().locale; for (String tag : getResources().getAssets().getLocales()) - languages.add(new Pair<>(tag, Locale.forLanguageTag(tag).getDisplayName())); + languages.add(new Pair<>(tag, Locale.forLanguageTag(tag).getDisplayName(slocale))); Collections.sort(languages, new Comparator>() { @Override