1

I am adding localization to my project. In the Info.plist, I have the array of localiztions I want: <key>CFBundleLocalizations</key> <array> <string>en</string> <string>fr</string> <string>de</string> </array> I then add a Localizable.strings resource, which I localized in the File inspector. I put the existing file in Base.lproj, 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:<key>CFBundleDevelopmentRegion</key> <string>fr_CA</string> 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?

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.