mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fixed Languages with specific countries
This commit is contained in:
parent
4f8a84341b
commit
9aad985aea
@ -43,8 +43,10 @@ class MainActivity : AppCompatActivity() {
|
|||||||
DynamicColors.applyToActivitiesIfAvailable(application)
|
DynamicColors.applyToActivitiesIfAvailable(application)
|
||||||
val languageName = sharedPreferences.getString("language", "sys")
|
val languageName = sharedPreferences.getString("language", "sys")
|
||||||
if (languageName != "") {
|
if (languageName != "") {
|
||||||
var locale = if (languageName != "sys") {
|
var locale = if (languageName != "sys" && "$languageName".length < 3 ){
|
||||||
Locale(languageName)
|
Locale(languageName)
|
||||||
|
} else if ("$languageName".length > 3) {
|
||||||
|
Locale(languageName?.substring(0,2), languageName?.substring(4,6))
|
||||||
} else {
|
} else {
|
||||||
Locale.getDefault()
|
Locale.getDefault()
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@
|
|||||||
<item>fa</item>
|
<item>fa</item>
|
||||||
<item>pl</item>
|
<item>pl</item>
|
||||||
<item>pt</item>
|
<item>pt</item>
|
||||||
<item>pr-rBR</item>
|
<item>pt-rBR</item>
|
||||||
<item>ru</item>
|
<item>ru</item>
|
||||||
<item>ckb</item>
|
<item>ckb</item>
|
||||||
<item>es</item>
|
<item>es</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user