Add language names and enable Spanish

This commit is contained in:
Imran Remtulla
2023-05-03 18:00:24 -04:00
parent e1980f4de2
commit cbec486ad1
3 changed files with 17 additions and 16 deletions

View File

@@ -216,7 +216,7 @@ class SettingsProvider with ChangeNotifier {
String? get forcedLocale {
var fl = prefs?.getString('forcedLocale');
return supportedLocales
.where((element) => element.toLanguageTag() == fl)
.where((element) => element.key.toLanguageTag() == fl)
.isNotEmpty
? fl
: null;
@@ -226,7 +226,7 @@ class SettingsProvider with ChangeNotifier {
if (fl == null) {
prefs?.remove('forcedLocale');
} else if (supportedLocales
.where((element) => element.toLanguageTag() == fl)
.where((element) => element.key.toLanguageTag() == fl)
.isNotEmpty) {
prefs?.setString('forcedLocale', fl);
}