invalidArgument invalidArgument - 1 year ago 97
iOS Question

New localizations not recognized in Xcode

I am adding localization to my project. In the Info.plist, I have the array of localiztions I want:


I then add a Localizable.strings resource, which I localized in the File inspector. I put the existing file in
, then added the english version. But Xcode doesn't let me add French or German localization versions for this resource.

This is rather simple, and I've done localization many times before. I don't understand why other languages are not available in the Xcode options. Documentation has not been helpful so far...

Note, I also have this key:

Whether I remove it or not, the output doesn't change.

Here's the options I have in the File inspector for the Localizable.strings: File inspector Localization options

What am I missing?

Answer Source

I found the answer and posting it for anyone else who'd ran into this...

What I missed was to add localizations to the project itself. To do this,

  1. select your project in the File Navigator.
  2. Then, instead of selecting your target, select your projet.
  3. Add localiztions there. By doing so, Xcode will ask you what existing resource you want to localize. Any new language there will be available when creating other localizable resources.

Here's an Xcode image of what to look for: enter image description here

What pointed me in the right direction is Apple documentation.

Image of the doc in case the link breaks: enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download