We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS info.plist
<key>CFBundleLocalizations</key> <array> <string>ar</string> <string>de</string> <string>en</string> <string>es</string> <string>fr</string> <string>it</string> <string>ja</string> <string>ko</string> <string>pt</string> <string>zh-Hant</string> </array>
Flutter project
MyProject languages/ ar.json de.json en.json ... zh-Hant.json pubspec.yaml flutter: assets: - languages/
If the startLocale is Locale('zh', 'Hant'), it is always not work.
fallbackLocale: const Locale('en'), startLocale: const Locale('zh', 'Hant'),
If I set the fallbackLocale is Locale('zh', 'Hant'), The program loads the language pack normally after restarted.
fallbackLocale: const Locale('zh', 'Hant'), startLocale: const Locale('zh', 'Hant'),
Main code:
void main() async { WidgetsFlutterBinding.ensureInitialized(); await EasyLocalization.ensureInitialized(); final global = Get.put(AppGlobal(), permanent: true); final savedLocale = await global.savedLocale(); Logger.log('当前存储的语言 $savedLocale'); runApp( EasyLocalization( supportedLocales: const [ Locale('ar'), Locale('de'), Locale('en'), Locale('es'), Locale('fr'), Locale('it'), Locale('ja'), Locale('ko'), Locale('pt'), Locale('zh', 'Hant') ], path: 'languages', fallbackLocale: const Locale('en'), startLocale: const Locale('zh', 'Hant'), child: const MyApp(), ), ); }
All other language packs load normally after restarting
Locale('ar'), Locale('de'), Locale('en'), Locale('es'), Locale('fr'), Locale('it'), Locale('ja'), Locale('ko'), Locale('pt'),
The text was updated successfully, but these errors were encountered:
void main() async { WidgetsFlutterBinding.ensureInitialized(); await EasyLocalization.ensureInitialized(); await DatabaseHelper().initDatabase(); final global = Get.put(AppGlobal(), permanent: true); final savedLocale = await global.savedLocale(); Logger.log('当前存储的语言 $savedLocale'); runApp( EasyLocalization( supportedLocales: const [ Locale('ar'), Locale('de'), Locale('en'), Locale('es'), Locale('fr'), Locale('it'), Locale('ja'), Locale('ko'), Locale('pt'), Locale('zh', 'Hant') ], path: 'languages', fallbackLocale: savedLocale.languageCode == 'zh' ? const Locale('zh', 'Hant') : const Locale('en'), startLocale: savedLocale, child: const MyApp(), ), ); }
Is this an Easy_localization bug? My solution is obviously not the best, waiting for your reply!
Sorry, something went wrong.
No branches or pull requests
Precondition
iOS info.plist
Flutter project
Problem description
If the startLocale is Locale('zh', 'Hant'), it is always not work.
If I set the fallbackLocale is Locale('zh', 'Hant'), The program loads the language pack normally after restarted.
Main code:
All other language packs load normally after restarting
The text was updated successfully, but these errors were encountered: