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:
parent
160f59a7a8
commit
dce0fda677
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue