mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Fix: Applying main locale language
This commit is contained in:
parent
6acdacd483
commit
ebb3ea7731
@ -123,7 +123,7 @@ object Utils {
|
||||
}
|
||||
val config = resources.configuration
|
||||
val sysLocale = if (Android.sdk(24)) config.locales[0] else config.locale
|
||||
if (setLocalCode != sysLocale.language || setLocalCode != "${sysLocale.language}-r${sysLocale.country}") {
|
||||
if (setLocalCode != sysLocale.toString() || setLocalCode != "${sysLocale.language}-r${sysLocale.country}") {
|
||||
val newLocale = getLocaleOfCode(setLocalCode)
|
||||
Locale.setDefault(newLocale)
|
||||
config.setLocale(newLocale)
|
||||
@ -156,6 +156,10 @@ object Utils {
|
||||
localeCode.substring(0, 2),
|
||||
localeCode.substring(4)
|
||||
)
|
||||
localeCode.contains("_") -> Locale(
|
||||
localeCode.substring(0, 2),
|
||||
localeCode.substring(3)
|
||||
)
|
||||
else -> Locale(localeCode)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user