xcode doesn't recognize localization in Info.plist

4.9k views Asked by At

I am using Xcode 4.4. As you may all know, there is an easy option to localize resource files in Xcode. You can also internationalize your plist Files, which is my approach.

But since 4.4 it doesn't seem to work properly anymore.

All you have to do is the following:

  1. In <project>-Info.plist file add key "Localization" which adds a subarray where you add your country codes as items
  2. now you can localize you resource file (like Localizable.strings) i.e. like so: make resource localizable followed by a modal screen where you're able to choose the languages defined in plist file choose localizable language
  3. Enter! The resource file now lives in <country identifier>.lproj folder.

In Xcode 4.4 you cannot choose your language, defined in plist file. Only English.
I tried everything. Don't want to localize manually.

Also in Xcode versions below 4.4 it was possible to add new languages with a '+'-button. It is not possible: Look at this:
localizations

Any suggestions. Or do I do it just the wrong way?

2

There are 2 answers

1
Alladinian On BEST ANSWER

Here is how you localize your recources in Xcode 4.4+ :

  1. Click on your project (navigator)
  2. On 'Info' tab under your project you'll see the 'Localizations' section
  3. Click on + to add a language
  4. Choose the files you want to localize in the sheet that will be displayed

Now Xcode will automatically create and put your files under the respective language folders. Finally if you want to localize other sources (such as image files), click on your file, bring the file inspector pane and click 'Make Localized...' button under 'Localization' section. Xcode will fire up another sheet with the available languages, choose the language and you're ready. I hope that this makes sense.

0
Fab1n On

The question is, too, how to localize multiple Info.plist files for multiple targets.

This is done very easily. Just add the languages you want your localization in to the projectile, as described above.

Project Settings

  • Then you click your several Info.plist Files, each for each target.
  • Open up the Utilities sidebar
  • Click "Make localized"

Localization of a file

Then choose between the in the project-file setup languages and you're done.