localizely/intl_utils

Feature request : Support delegates from multiple dart modules

Opened this issue · 1 comments

Hi,

when splitting our project in dart modules for keep the code and decouple we had struggles to decouple the translation files. We would like to have access to the messages from all dart modules.

We find a way to do it by using this importing this package
multiple_localization

and modifying the GENERATED CODE by just changing this method:
@override Future<S> load(Locale locale) => S.load(locale);

BY THIS

@override Future<S> load(Locale locale) => MultipleLocalizations.load(initializeMessages, locale, (l) => S(), setDefaultLocale: true);

and adding all delegates we need
image

Do you think is something that can be easy implement in the code generator to have a flag to enable the use of this module?
This will be a huge thing for us.

Best regards,
LMM

Linking this issue localizely/flutter-intl-vscode#37 from VSCode extension