I am using easy_localization: ^2.3.3 in a flutter project with CSV loader. When I build it is not able to find keys and it gives "Easy Localization: Localization key [...] not found". Any ideas why is this happening?
runApp(EasyLocalization(
supportedLocales: [
Locale('en', ''),
Locale('it', ''),
Locale('es', ''),
Locale('de', ''),
Locale('fr', ''),
Locale('pt', ''),
],
path: 'resources/langs/langs.csv',
fallbackLocale: Locale('en', ''),
saveLocale: false,
useOnlyLangCode: true,
assetLoader: CsvAssetLoader(),
child: MyApp(status),
));
}
Easy localizationIt does more than support language translations; it also supports gender, text direction, pluralization, and more. The package loads translation files using the Easy Localization Loader and then updates the app to use the current language set during the translations.
Also this error can be happen for not setting the material app; I mean, I got same error for forgeting the add these lines to my material app;
MaterialApp(
locale: context.locale,
supportedLocales: context.supportedLocales,
localizationsDelegates: context.localizationDelegates,
),
and my problem solved !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With