diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index 95200fbcc..6da74346a 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -93,12 +93,16 @@ class LanguageService { static Future localeDetection() async { try { - var locale = await Devicelocale.currentLocale ?? ''; - locale = Intl.shortLocale(locale); - + final locale = Intl.canonicalizedLocale(await Devicelocale.currentLocale ?? ""); if (list.keys.contains(locale)) { return locale; } + + final language = Intl.shortLocale(locale); + if (list.keys.contains(language)) { + return language; + } + return LanguageService.defaultLocale; } catch (_) { return LanguageService.defaultLocale;