I have a database on the server that contains all the keywords that I use in my applications, and these languages ββcan be changed at any time.
The database language table has a column for Language (id , key, value, lang) .
In the Android application, I read the language from the device, and it returns, for example, en-GB or en-US .
But in the iOS app, I cannot get the language, as in the above example. It always returns only the language ( en , es, fr ).
Therefore, I cannot query the database to retrieve the specified keywords in the iOS app. Because the languages ββin the database are en-GB, en-US style.
var langId: String? = NSLocale.preferredLanguages().first as? String
How can I get a language with more details?
ios objective-c swift
Morteza soleimani
source share