iOS:How to get current application language
ios, iphone, locale, localization
Solution
What i always do:
Add a string entry into the Localizable.strings files. I always use the key `"lang"="de";` (or `"lang"="en"`, etc.).
Then you can use it in your NSURLRequest by adding the language over `NSLocalizedString(@"lang", @"")`
With that method you have absolute control what is going to be sent to you backend.
Problem
The application that I'm working on supports 3 languages: English, French and German. How I can get the current application language (NOT the device language)? The problem is that I have to get the current language of the application in order to send it with a request to the server and the respond should be in the right language. The device language is useless because if the user switch the os language to Italian, the app is running in English and I need to send english to the server. Thanks