Add a option for Basque translation
This commit is contained in:
parent
e23bc96cf6
commit
caa2eaa9a2
|
@ -23,6 +23,7 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
object Spanish : LanguagesPreference(8)
|
object Spanish : LanguagesPreference(8)
|
||||||
object Polish : LanguagesPreference(9)
|
object Polish : LanguagesPreference(9)
|
||||||
object Russian : LanguagesPreference(10)
|
object Russian : LanguagesPreference(10)
|
||||||
|
object Basque : LanguagesPreference(11)
|
||||||
|
|
||||||
override fun put(context: Context, scope: CoroutineScope) {
|
override fun put(context: Context, scope: CoroutineScope) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
@ -47,6 +48,7 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
Spanish -> context.getString(R.string.spanish)
|
Spanish -> context.getString(R.string.spanish)
|
||||||
Polish -> context.getString(R.string.polish)
|
Polish -> context.getString(R.string.polish)
|
||||||
Russian -> context.getString(R.string.russian)
|
Russian -> context.getString(R.string.russian)
|
||||||
|
Basque -> context.getString(R.string.basque)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getLocale(): Locale =
|
fun getLocale(): Locale =
|
||||||
|
@ -62,6 +64,7 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
Spanish -> Locale("es", "ES")
|
Spanish -> Locale("es", "ES")
|
||||||
Polish -> Locale("pl", "PL")
|
Polish -> Locale("pl", "PL")
|
||||||
Russian -> Locale("ru", "RU")
|
Russian -> Locale("ru", "RU")
|
||||||
|
Basque -> Locale("eu", "EU")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setLocale(context: Context) {
|
fun setLocale(context: Context) {
|
||||||
|
@ -96,7 +99,8 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
Hindi,
|
Hindi,
|
||||||
Spanish,
|
Spanish,
|
||||||
Polish,
|
Polish,
|
||||||
Russian
|
Russian,
|
||||||
|
Basque,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun fromPreferences(preferences: Preferences): LanguagesPreference =
|
fun fromPreferences(preferences: Preferences): LanguagesPreference =
|
||||||
|
@ -112,6 +116,7 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
8 -> Spanish
|
8 -> Spanish
|
||||||
9 -> Polish
|
9 -> Polish
|
||||||
10 -> Russian
|
10 -> Russian
|
||||||
|
11 -> Basque
|
||||||
else -> default
|
else -> default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +133,7 @@ sealed class LanguagesPreference(val value: Int) : Preference() {
|
||||||
8 -> Spanish
|
8 -> Spanish
|
||||||
9 -> Polish
|
9 -> Polish
|
||||||
10 -> Russian
|
10 -> Russian
|
||||||
|
11 -> Basque
|
||||||
else -> default
|
else -> default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user