How to localize multiple files at once in Xcode?

In the process of localizing my application, I have about 50 resources (mainly xibs) that need to be localized. I know how to add localization for each file, but it is quite a time-consuming process to open an information panel and add localization for each file.

Is there a way to select multiple files and add localization to each of them in one shot?

Edit to add: Is this a place where AppleGlot or iLocalize can help? I have not looked at these tools yet.

+4
source share
4 answers

Just create a directory for the language for which you are localized if it does not already exist (for example, "en.lproj") and copy all the files there. Then go to xcode and add the newly copied files to your project.

+1
source

Have you tried using ibtool? This tool, which is launched from the terminal, can display classes or objects in nib files, as well as delete localized strings in plist.

I have not tried this tool yet, but you can find more information by typing "man ibtool" in the terminal.

+1
source

Selecting multiple files in the left / navigation panel and then adding localization through the panel on the right / utility should work, but it is not. I filed error # 9276560 on Xcode 4.0.1.

If you need to support many languages, this can help:

  • Click on the file #n
  • Add localization
  • Repeat steps 1 and 2 for all files
  • Click on the project in the left / navigation section
  • In the project details pane, add localization

What this means is, add each previously localized file to a new language (s). You still have to add 50 files separately, but at least you will not need to perform 50 operations compared to the number of languages. In my case, it saved me several hundred steps.

0
source

Reply in another post here

In essence, you need to create xx.lproj directories for all your languages. Then copy all localized files to the appropriate directories. Your lproj dirs should now have files with the same name (but with different localized contents). Then you add all the files from all the dirs in Xcode. Xcode will assign them to the appropriate locales based on lproj dirs where they are.

0
source

All Articles