Prior to iOS 13 it was possible to call Locale.preferredLanguages.first
to get general device language, but iOS 13 introduced app-specific languages. The problem is that if you select an app-specific language that doesn't match language in preferredLanguages
then it will be pushed to the beginning of the array, but if you select the language that matches the language that contains in preferredLanguages
then this language will stay on it place. So, starting with iOS 13 we cannot be really sure that the first language in preferredLanguages
is indeed general device language and also the way that the array gets updated is really weird. I'm thinking about this problem for the entire day but cannot find the solution. Maybe someone knows the way to get general device language on iOS 13 device? Thanks
Asked
Active
Viewed 150 times
5

jonnyB_5531
- 171
- 6
-
There's a good discussion of this in SO over [here](https://stackoverflow.com/questions/48136456/locale-current-reporting-wrong-language-on-device) that may help. – Glenn Jul 29 '20 at 00:49
-
1@Glenn thanks for the reply, the problem that all the stuff that was discussed in the topic you provided was only useful for iOS prior to 13 – jonnyB_5531 Jul 29 '20 at 09:17
-
@jonnyB_5531 did you get any clue on that? I tried everything but not getting device setting language. (I am not talking about app language @all) – Bhavesh Lathigara May 13 '21 at 07:09