NSLocalizedString provides another language, then the phone is in

My base project language is English. My simulator / phone is in English. Projects support English, French, Dutch.

When the app is launched for the first time, the app is always in French, even when the phone is in English.

When I debug and print this line:

[NSLocale preferredLanguages][0];

      

It gives the correct language, namely English.

Does anyone have an idea why this is?

+3


source to share


2 answers


Please check the following.

  • Click on your project_name -> change schema ...
  • Click on the "Options" tab
  • Select "Application Language" in English (or whatever you need)

Just renaming the localization files can cause some other errors. Here is Apple's guide to database localization:

https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/InternationalizingYourUserInterface/InternationalizingYourUserInterface.html



To remove the base localization:

  • click on your project in the file inspector.
  • Select "Info" in your project and uncheck "Use basic internationalization" in the "Localization" section

Hope it helps.

+3


source


My guess is that Apple broke something with the simulator because it works on real devices with Xcode 6.1. Real device check



0


source







All Articles