[go: nahoru, domu]

Skip to content
New issue

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

Asset loader only works if the application is reloaded #11

Open
peppix2010 opened this issue Aug 21, 2020 · 0 comments
Open

Asset loader only works if the application is reloaded #11

peppix2010 opened this issue Aug 21, 2020 · 0 comments

Comments

@peppix2010
Copy link

Hi,
just starting to add the assett loader and easy localisation in my application.
If I build and run my application on my pc both the emulator and the usb connected phone work perfectly using the correct languages depending on the locale defined.
If I build the app using a CI/CD tool (codemagic.io) the assett loader stops working showing the strings ids instead of the translation.
If I attch and debug from android studio still doesnt work, but once I reload the application directly from Android studio now the locales are working.
Looks like then there is an initialization problem.

The code in main.dart is:

`
import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization_loader/easy_localization_loader.dart';
..

void main() {
runApp(EasyLocalization(
supportedLocales: [Locale('en', 'US'), Locale('it', 'IT')],
fallbackLocale: Locale('en', 'US'),
path: 'assets/translations/langs.csv',
assetLoader: CsvAssetLoader(),
child: MyApp(),
));
}`

class MyApp extends StatelessWidget { ... localizationsDelegates: context.localizationDelegates, supportedLocales: context.supportedLocales, locale: context.locale,

Can you please help me in solving the error?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant