mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-07-29 15:19:50 +00:00
Fix: Respect country in locale language (close #151)
This commit is contained in:
@ -119,7 +119,7 @@ object Utils {
|
|||||||
fun Context.setLanguage(): Configuration {
|
fun Context.setLanguage(): Configuration {
|
||||||
var setLocalCode = Preferences[Preferences.Key.Language]
|
var setLocalCode = Preferences[Preferences.Key.Language]
|
||||||
if (setLocalCode == PREFS_LANGUAGE_DEFAULT) {
|
if (setLocalCode == PREFS_LANGUAGE_DEFAULT) {
|
||||||
setLocalCode = Locale.getDefault().language
|
setLocalCode = Locale.getDefault().toString()
|
||||||
}
|
}
|
||||||
val config = resources.configuration
|
val config = resources.configuration
|
||||||
val sysLocale = if (Android.sdk(24)) config.locales[0] else config.locale
|
val sysLocale = if (Android.sdk(24)) config.locales[0] else config.locale
|
||||||
|
Reference in New Issue
Block a user