load static method
Loads the ValidatorLocalizations instance for the given locale
.
This method initializes the localized messages for the specified locale.
Implementation
static Future<ValidatorLocalizations> load(Locale locale) {
final name = locale.countryCode == null || locale.countryCode!.isEmpty
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
return ValidatorLocalizations._(localeName);
});
}