Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easy Localization: Localization key [...] not found

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),
  ));
}

like image 393
avafab Avatar asked Dec 04 '20 09:12

avafab


People also ask

What is easy localization?

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.


1 Answers

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 !

like image 171
leylekseven Avatar answered Oct 17 '22 09:10

leylekseven