1
0
Fork 0

Added Kiswahili

This commit is contained in:
Marvin Ochieng 2024-04-19 07:03:17 +03:00 committed by Dimo Karaivanov
parent e6e5908dbc
commit 90288713f1
4 changed files with 91107 additions and 3 deletions

View file

@ -139,6 +139,18 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
}
private String getSortingId() {
switch (getLocale().getLanguage()) {
case "fi":
return "su";
case "sw":
return "ki";
default:
return getLocale().toString();
}
}
@NonNull
@Override
public String getAbcString() {
@ -240,8 +252,6 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
@Override
public int compareTo(NaturalLanguage other) {
String key = getLocale().getCountry().equals("FI") ? "su" : getLocale().toString();
String otherKey = other.getLocale().getCountry().equals("FI") ? "su" : other.getLocale().toString();
return key.compareTo(otherKey);
return getSortingId().compareTo(other.getSortingId());
}
}