When working with this package for localization, and base translation done in EN, I want my 2nd language to show keys if they are present in 2nd language json file, but if they are not, to consume en.json equivalent value. Issue is that by default this package shows key that doesn't exist in JSON file, instead of fallback translation file value. Is there a way to override this?
Usage of the plugin in main.dart file
runApp(
EasyLocalization(
child: MyApp(),
useOnlyLangCode: true,
fallbackLocale: Locale('en'),
supportedLocales: [
Locale('en'),
Locale('es'),
],
path: 'lang',
),
);
And when I want to translate a key that exists in en.json, but doesn't exist in es.json file it looks like this:
tr('appTitle');
Expected result would be "Hello world", but I get "appTitle" on the screen.