3

My project base language is English. My simulator/phone is in English. The projects supports English, French, Dutch.

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

When I debug and print out this line:

[NSLocale preferredLanguages][0];

It gives me the correct language namely English.

Does someone have an idea why this is?

user1007522
  • 7,858
  • 17
  • 69
  • 113
  • Could you show an example of Localizable.strings? – alfonsomiranda Jun 22 '15 at 09:14
  • make a double check in the directory structure of your project, be sure that you are not mixing them in the wrong directories – Andrea Jun 22 '15 at 09:15
  • That was the problem. The project structure was Base.lproj insteal of en.lproj that why he was skipping English and going further with French. Solved the problem by just renaming it. – user1007522 Jun 22 '15 at 09:29

2 Answers2

5

Please, check the following.

  1. Tap on your project_name -> edit scheme...
  2. Click on 'Options' tab
  3. Select on 'Application language' English (or whatever you need)

Just renaming localization files may cause some other bugs. Here is Apple guide about base localization:

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

In order to remove base localization:

  1. click on your project in file inspector.
  2. Select 'Info' tap on yours project and deselect 'Use base Internationalization' on 'Localizations' section

Hope this helps.

Doro
  • 2,413
  • 2
  • 14
  • 26
0

I'm guessing Apple broke something with the simulator, because it works on real devices from Xcode 6.1. Check on real device

Bhanupriya
  • 1,202
  • 1
  • 9
  • 20