initializeMessages function

Future<bool> initializeMessages(
  1. String localeName
)

User programs should call this before using localeName for messages.

Implementation

Future<bool> initializeMessages(String localeName) async {
  LibraryLoader? lib = _deferredLibraries[Intl.canonicalizedLocale(localeName)];
  await (lib == null ? Future.value(false) : lib());
  initializeInternalMessageLookup(() => CompositeMessageLookup());
  messageLookup.addLocale(localeName, _findGeneratedMessagesFor);
  return true;
}