How to detect if the language is English (All variants) on Android?
From the Locale
docs:
The language codes are two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1. The country codes are two-letter uppercase ISO country codes (such as "US") as defined by ISO 3166-1.
This means that
Locale.getDefault().getLanguage().equals("en")
should be true
. I'd be careful with hiding/showing UI only by default Locale
though. Many countries may have many users that prefer another language, but are perfectly fluent in English.