You can get the Locale array using getAvailableLocales() , and then scroll through it to see if it is available.
boolean hasLocale = false; String myLocale = "en"; Locale[] locales = Locale.getAvailableLocales(); for (Locale locale : locales) { if (locale.getLanguage().equals(myLocale)) { hasLocale = true; } }
source share