From 3074766ff2cdf0f62feb6dabee9551b3602ff7f7 Mon Sep 17 00:00:00 2001 From: aAbed <39409020+TheAabedKhan@users.noreply.github.com> Date: Mon, 5 May 2025 19:39:42 +0545 Subject: [PATCH] fix: Use device locale for app language (Default to English) (#2488) --- lib/services/manager_api.dart | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 44b70bd6..6050ca2f 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -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 setLocale(String value) async {