load static method

Future<S> load(
  1. Locale locale
)

Implementation

static Future<S> 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;
    S.current = S();

    return S.current!;
  });
}