Last updated:
0 purchases
intl multiple translations
Allow intl to support multiple translations
per locale.
It keeps an already loaded translation if the intl message lookup mechanism was
initialized with a
CompositeMessageLookup
subclass (as intl_translation and
intl_utils do).
Usage #
Call initializeMultipleTranslations() before loading another translation for
the same locale.
You can do this before loading any translation, for example, in the main
function:
import 'package:intl_multiple_translations/intl_multiple_translations.dart';
Future<void> main() async {
initializeMultipleTranslations();
await initializeMessages('es');
await initializeMoreMessages('es');
...
}
copied to clipboard
or before loading additional translations, for example, in a package:
import 'package:intl_multiple_translations/intl_multiple_translations.dart';
Future<bool> initializePackageMessages(String localeName) {
initializeMultipleTranslations();
return initializeMessages(localeName);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.