@Test public void findBestMatchingLocaleForLanguage_all_build_config_languages_can_be_resolved() { for (String lang : buildConfigLanguages()) { Locale locale = LocaleParser.findBestMatchingLocaleForLanguage(lang); assertEquals(lang, locale.toString()); } }
static Locale findBestMatchingLocaleForLanguage(@Nullable String language) { final Locale locale = LanguageString.parseLocale(language); if (appSupportsTheExactLocale(locale)) { return locale; } else { return findBestSystemLocale(); } }
LocaleParser { static Locale findBestMatchingLocaleForLanguage(@Nullable String language) { final Locale locale = LanguageString.parseLocale(language); if (appSupportsTheExactLocale(locale)) { return locale; } else { return findBestSystemLocale(); } } }
LocaleParser { static Locale findBestMatchingLocaleForLanguage(@Nullable String language) { final Locale locale = LanguageString.parseLocale(language); if (appSupportsTheExactLocale(locale)) { return locale; } else { return findBestSystemLocale(); } } private  LocaleParser(); }
LocaleParser { static Locale findBestMatchingLocaleForLanguage(@Nullable String language) { final Locale locale = LanguageString.parseLocale(language); if (appSupportsTheExactLocale(locale)) { return locale; } else { return findBestSystemLocale(); } } private  LocaleParser();  }
LocaleParser { static Locale findBestMatchingLocaleForLanguage(@Nullable String language) { final Locale locale = LanguageString.parseLocale(language); if (appSupportsTheExactLocale(locale)) { return locale; } else { return findBestSystemLocale(); } } private  LocaleParser();   }