mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-10 05:16:16 +00:00
fix: Use device locale for app language (Default to English) (#2488)
This commit is contained in:
@@ -325,13 +325,7 @@ class ManagerAPI {
|
||||
}
|
||||
|
||||
String getLocale() {
|
||||
final String? savedLocale = _prefs.getString('locale');
|
||||
if (savedLocale != null && savedLocale.isNotEmpty) {
|
||||
return savedLocale;
|
||||
} else {
|
||||
final Locale deviceLocale = PlatformDispatcher.instance.locale;
|
||||
return deviceLocale.languageCode.isNotEmpty ? deviceLocale.languageCode : 'en';
|
||||
}
|
||||
return _prefs.getString('locale') ?? Platform.localeName;
|
||||
}
|
||||
|
||||
Future<void> setLocale(String value) async {
|
||||
|
||||
Reference in New Issue
Block a user