resolveCodeInLocales method

String? resolveCodeInLocales(
  1. String code,
  2. List<String> locales
)

The unformatted message for code in the first of locales (most specific first, ending with '') that has one, or null.

Calls resolveCode locale by locale; sources with several bundles override it to search bundle by bundle (see ReloadableResourceBundleMessageSource).

Implementation

String? resolveCodeInLocales(String code, List<String> locales) {
  for (final locale in locales) {
    final pattern = resolveCode(code, locale);
    if (pattern != null) {
      return pattern;
    }
  }
  return null;
}