5

So I'am using a button to switch language from english to french !

My problem is that i need to know the language of my current Application only not the language of my device .

I'am using these line of code in order to know the current language

Locale.getDefault().getLanguage()

but Apparently he's returning my device language .

Any help will be appreciated .

Ahlem Jarrar
  • 1,129
  • 1
  • 12
  • 33

1 Answers1

0

Try this:

getResources().getConfiguration().locale

https://stackoverflow.com/a/12530405/6371926

Community
  • 1
  • 1
Alberto
  • 1,423
  • 18
  • 32