Changing language on iOS 8.1 simulator does not work

IosLocalizationIos Simulatorxcode6.1ios8.1

Ios Problem Overview


If I change the language on an iOS 8.1 simulator to anything and try to detect this from code with

NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
NSLog(@"Language: %@", language);

I get "en" back. I've tried resetting the navigator, etc. I've tried this using the iOS 7.1 runtime (in Xcode 5.1.1), and it worked fine. Has anyone managed to find a workaround to this problem?

Ios Solutions


Solution 1 - Ios

According to the release notes this is a known issue. There is a work around. If you go to "Edit Scheme..." then the "Options" tab there's an "Application Language" option. This only affects the current run settings, not the app, much like changing the language of the device.

enter image description here

Solution 2 - Ios

Another dupe of https://stackoverflow.com/questions/26146668/ios8-1-simulator-always-uses-us-keyboard-layout-despite-german-hardware-keyboard

Known and documented bug as mentioned in the Xcode 6.1 release notes. File a radar if you want to add your +1 to the complaint list at http://bugreport.apple.com

Solution 3 - Ios

My simulator is in French language. When I want to check interface in English then changing the iphone language is not enough. I have to switch the region settings minimum two times.

Solution 4 - Ios

use [[NSLocale availableLocaleIdentifiers]

Solution 5 - Ios

In my case, editing schema works for region but not for language. It looks overwrite by development language. Changing developmentRegion works fine with project.pbxproj like this.

developmentRegion = ja;

enter image description here

Xcode Version 11.3.1 (11C504)

iPhoneX iOS 13.3.1

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJanosView Question on Stackoverflow
Solution 1 - IosadjwilliView Answer on Stackoverflow
Solution 2 - IosJeremy Huddleston SequoiaView Answer on Stackoverflow
Solution 3 - IosBlazej SLEBODAView Answer on Stackoverflow
Solution 4 - IosDiegoView Answer on Stackoverflow
Solution 5 - IoskazuwombatView Answer on Stackoverflow