Sort locales of the same priority level alphabetically for consistent selection of fallback language
This commit is contained in:
parent
5075d78537
commit
e7993668b6
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue