1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Show language names using system locale

This commit is contained in:
M66B 2022-05-15 14:38:42 +02:00
parent 160f59a7a8
commit dce0fda677

View file

@ -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<Pair<String, String>>() {
@Override