Sort locales of the same priority level alphabetically for consistent selection of fallback language

This commit is contained in:
Brian Lowe 2021-06-01 15:10:56 +03:00
parent 5075d78537
commit e7993668b6

View file

@ -36,8 +36,14 @@ public class LangSort {
} }
protected int compareLangs(String t1lang, String t2lang) { protected int compareLangs(String t1lang, String t2lang) {
int index1 = languageIndex(t1lang);
int index2 = languageIndex(t2lang);
if(index1 == index2) {
return t1lang.compareTo(t2lang);
} else {
return languageIndex(t1lang) - languageIndex(t2lang); return languageIndex(t1lang) - languageIndex(t2lang);
} }
}
/** /**
* Return index of exact match, or index of partial match, or * Return index of exact match, or index of partial match, or