fix: disable changing languages for now.

This commit is contained in:
Aunali321 2022-11-29 17:45:42 +05:30
parent c5ba6a238a
commit a0af0dde0a
2 changed files with 8 additions and 6 deletions

View file

@ -60,10 +60,11 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String rawLocale = prefs.getString('language') ?? 'en_US'; // String rawLocale = prefs.getString('language') ?? 'en_US';
String replaceLocale = rawLocale.replaceAll('_', '-'); // String replaceLocale = rawLocale.replaceAll('_', '-');
List<String> localeList = replaceLocale.split('-'); // List<String> localeList = replaceLocale.split('-');
Locale locale = Locale(localeList[0], localeList[1]); // Locale locale = Locale(localeList[0], localeList[1]);
Locale locale = const Locale('en', 'US');
return DynamicThemeBuilder( return DynamicThemeBuilder(
title: 'ReVanced Manager', title: 'ReVanced Manager',
@ -71,6 +72,7 @@ class MyApp extends StatelessWidget {
localizationsDelegates: [ localizationsDelegates: [
FlutterI18nDelegate( FlutterI18nDelegate(
translationLoader: FileTranslationLoader( translationLoader: FileTranslationLoader(
fallbackFile: 'en_US',
forcedLocale: locale, forcedLocale: locale,
basePath: 'assets/i18n', basePath: 'assets/i18n',
useCountryCode: true, useCountryCode: true,

View file

@ -42,8 +42,8 @@ class SettingsView extends StatelessWidget {
delegate: SliverChildListDelegate.fixed( delegate: SliverChildListDelegate.fixed(
<Widget>[ <Widget>[
SUpdateThemeUI(), SUpdateThemeUI(),
SUpdateLanguageUI(), // SUpdateLanguageUI(),
_settingsDivider, // _settingsDivider,
STeamSection(), STeamSection(),
_settingsDivider, _settingsDivider,
SAdvancedSection(), SAdvancedSection(),