mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-11 13:46:17 +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() {
|
String getLocale() {
|
||||||
final String? savedLocale = _prefs.getString('locale');
|
return _prefs.getString('locale') ?? Platform.localeName;
|
||||||
if (savedLocale != null && savedLocale.isNotEmpty) {
|
|
||||||
return savedLocale;
|
|
||||||
} else {
|
|
||||||
final Locale deviceLocale = PlatformDispatcher.instance.locale;
|
|
||||||
return deviceLocale.languageCode.isNotEmpty ? deviceLocale.languageCode : 'en';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> setLocale(String value) async {
|
Future<void> setLocale(String value) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user