mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 21:15:37 +02:00
fix: Use device locale for app language (Default to English) (#2488)
This commit is contained in:
parent
722f2b645f
commit
3074766ff2
1 changed files with 1 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue