Skip to content

Commit b610f94

Browse files
committed
add improvements for language detection
1 parent ede09f0 commit b610f94

File tree

1 file changed

+6
-1
lines changed
  • appcore/src/main/java/org/torproject/android/core

1 file changed

+6
-1
lines changed

appcore/src/main/java/org/torproject/android/core/Languages.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Languages private constructor(activity: Activity) {
3939
Locale("bn"), Locale("ca"), Locale("cs"),
4040
Locale("da"), Locale("el"), Locale("es"),
4141
Locale("es", "MX"),
42+
Locale("es", "CU"),
43+
4244
Locale("es", "AR"),
4345
Locale("en","GB"),
4446
Locale("eo"),
@@ -185,8 +187,11 @@ class Languages private constructor(activity: Activity) {
185187
} else if (locale.language.equals("nah")) {
186188
tmpMap["nah"] = "Nahuatl"
187189
}
190+
else if (locale.country.equals("cu",true)) {
191+
tmpMap[locale.toString()] = "Español Cubano"
192+
}
188193
else {
189-
tmpMap[locale.toString()] = locale.getDisplayLanguage(locale) + " " + locale.getDisplayCountry(locale)
194+
tmpMap[locale.toString()] = locale.getDisplayLanguage(locale).capitalize() + " " + locale.getDisplayCountry(locale)
190195
}
191196
}
192197

0 commit comments

Comments
 (0)