Android get current language

Here are the different ways to get current language in Android application, depend of the case you like to use.

Locale.getDefault().getLanguage() —> en
Locale.getDefault().getISO3Language() —> eng
Locale.getDefault().getCountry() —> US
Locale.getDefault().getISO3Country() —> USA
Locale.getDefault().getDisplayCountry() —> United States
Locale.getDefault().getDisplayName() —> English (United States)
Locale.getDefault().toString() —> en_US

It is useful when you want to change your application language, you can check which language is the current one.

Leave a Reply

Your email address will not be published. Required fields are marked *