Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I localized my app in Italian and English, using the Localizable.strings file and the NSLocalizedString macro. I also enabled base localization. Everything works fine in the simulator and on devices with iOS 8, but on iOS 9 the app is always in english, even on devices with the italian language selected as default in the iPhone settings. Does iOS 9 changes something with localization?

Here's a screenshot of the Xcode localization settings
http://i.imgur.com/xc20yjj.png1

And of the device used for testing
http://i.imgur.com/QCjn52u.png

Thanks in advance

share|improve this question
    
Do you have any suggestion on what should be the problem? The app was approved this morning and downloading it from the App Store it shows only the english version of the contents – lorenzoliveto Sep 22 '15 at 8:50
    
@lorenzoliveto Could you please show two things: a screenshot of your Xcode project's localisations, and the device language+region that your test device is set to? – wakachamo Sep 22 '15 at 9:52
    
I added the screenshot to the question. – lorenzoliveto Sep 22 '15 at 10:05
1  
What language is your scheme running in? Select your app title in the breadcrumb in Xcode (next to the simulator selector) -> Edit Scheme... -> Run -> Options -> Application Language? – wakachamo Sep 22 '15 at 11:11
    
The Application Language is settled to the System Language. Everything seems ok in fact I don't know where to look at – lorenzoliveto Sep 22 '15 at 12:20
up vote 7 down vote accepted

Solved, the "problem" was the key "Localization native development region" in the info.plist file. It was setted to Italy, so when the app was running in a device with the Italian language as default it was showing the Base localization version of the strings (the English version). Changing the value to United States solved the issue.

share|improve this answer
    
I met the same problem. But I change the value to 'Unite States' did not help. My 2nd language is Chinese Traditional. – Ducky Chen Nov 4 '15 at 9:36
    
However, if I change the 'Region' setting of the iOS device to 'Unite States', I can see Chinese on my app then. Why does the 'Region' setting matter? – Ducky Chen Nov 4 '15 at 9:38
    
Your base strings file is in english or in chinese? – lorenzoliveto Nov 4 '15 at 10:18
    
My base string file is in english – Ducky Chen Nov 4 '15 at 10:26
    
I'm sorry but I can't help, this is a very strange behavior – lorenzoliveto Nov 4 '15 at 10:33

I have another solution, just remove the key 'Localizations' in info.plist. It works for my case.

share|improve this answer
    
This worked for me. Project-Info-Localization and info.plist-Localization was different in my case. – Minsu Dec 24 '15 at 8:50

I've found a workaround. The root cause of this problem is Apple changed the "Language Identifiers" in iOS 9, please refer to https://developer.apple.com/library/ios/technotes/tn2418/_index.html

Since NSLocalizedString() (and variants thereof) access the "AppleLanguages" key in NSUserDefaults to determine what the user's settings for preferred languages are. I forced NSLocalizedString to use a specific language with is noted as their old Language Identifiers in older iOS versions once I found their Language ID is in new format. In another word, I made a mapping of "AppleLanguages" key value.

To do this, please refer to: How to force NSLocalizedString to use a specific language

I think Apple did a very bad job in compatibility!!

share|improve this answer
    
Note that I cannot find a way to add a localized resource with code "zh-TW", I can only add "zh", "zh-Hant" or "zh-Hant-TW" only. Not sure if it is a bug of apple. – Ducky Chen Nov 4 '15 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.