From 9498d428cdc996ec245328b094ec169aedc2667d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 14 Nov 2024 00:40:58 +0800 Subject: [PATCH] :bug: Use only lang code on localization to fix not found bug --- assets/translations/{en-US.json => en.json} | 0 assets/translations/{zh-CN.json => zh.json} | 0 lib/main.dart | 1 + 3 files changed, 1 insertion(+) rename assets/translations/{en-US.json => en.json} (100%) rename assets/translations/{zh-CN.json => zh.json} (100%) diff --git a/assets/translations/en-US.json b/assets/translations/en.json similarity index 100% rename from assets/translations/en-US.json rename to assets/translations/en.json diff --git a/assets/translations/zh-CN.json b/assets/translations/zh.json similarity index 100% rename from assets/translations/zh-CN.json rename to assets/translations/zh.json diff --git a/lib/main.dart b/lib/main.dart index 640c460..a1193ac 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -35,6 +35,7 @@ class SolianApp extends StatelessWidget { supportedLocales: [Locale('en', 'US'), Locale('zh', 'CN')], fallbackLocale: Locale('en', 'US'), useFallbackTranslations: true, + useOnlyLangCode: true, assetLoader: JsonAssetLoader(), child: MultiProvider( providers: [