How to get the current iPhone Language Code
We are currently developing an iPhone App which requires localization support and I ran into an issue while trying to get currently set language.
Cocoa Touch has a class called NSLocale which let’s you query the language by writing the following code:
At least one would expect so, but it actually gives you the language of the region format you have configured in your settings.
For example:
If you have your iPhone language set to ‘English’, but your region format is set to ‘Germany’, the call will return ‘de’ instead of ‘en’.
What you really should call is:
Because this gives you not the language associated with the region, but the language the device is actually configured for.