iOS:How to get current application language

The accepted answer is a workaround.

Regarding language preferences in the device itself, you have the

[NSLocale preferredLanguages]

which will give you an ordered array of the preferred languages as defined in the system's General Settings.

The Cocoa Touch framework will take this list of preferred languages into account when loading the app's localization resources and filter it according to the translations you provide in the bundle.

This filtered and ordered list of localized languages can be obtained with

[[NSBundle mainBundle] preferredLocalizations]

Your server requests should match the first value in this array or you will have a language mismatch between app and server data.


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.


You may use the preferredLocalizations method of the NSBundle class:

NSString *currentLocalization = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];