load static method

Future<ApLocalizations> load(
  1. Locale locale
)

Implementation

static Future<ApLocalizations> load(Locale locale) {
  final name = (locale.countryCode?.isEmpty ?? false)
      ? locale.languageCode
      : locale.toString();
  final localeName = Intl.canonicalizedLocale(name);
  return initializeMessages(localeName).then((_) {
    Intl.defaultLocale = localeName;
    final instance = ApLocalizations();
    ApLocalizations._current = instance;

    return instance;
  });
}