2

This question hes already been asked by different users, e.g. here. But nevertheless, I need to repeat it as the provided answers do not help to get the CURRENT device language. My test device is in German language and the app in English. I try to get the current device language as follows:

  • Log.i("Language", Locale.getDefault().language)
  • Log.i("displayLanguage", Locale.getDefault().displayLanguage)

and both methods return:

  • I/Language: en
  • I/displayLanguage: English

which is not true. It should return something like this:

  • I/Language: de
  • I/displayLanguage: Deutsch

Do I do something wrong or there is a different way to get it done?

Many thanks in advance!

Mark Delphi
  • 1,011
  • 1
  • 9
  • 23

0 Answers0