Localization for new Files in older Project breaks App

Go To StackoverFlow.com


Good evening

I want to add a new year, a new volume as plist-file to my existing app. The app is localized for 4 languages, so the new file has to be localized also. The languages were "English", "German", "French" and "Italian".

But when I do this, Xcode creates a directory "de.lproj" next to the existing "German.lproj", same behaviour for French and Italian, but not English. The older localized files are now in a directory "German.lproj", the newly generated plist in a folder called "de.lproj".

Then the app will no longer recognize the localized strings, exept the english version.

How can I add a new localized file to this project without breaking the rest?


2012-04-03 22:13
by uruk


Finally I solved the problem like this:

  1. Make a backup of each localized file (plist and strings files) in the Finder and collect them in a folder for each language.
  2. In Xcode, remove every localization for these files so that the only remaining language is English.
  3. In Finder, delete the old lproj directories in the project folder except English.lproj.
  4. In Xcode, add the formerly deleted localizations for each file. Copy the contents of the files into the newly generated localized files.

Maybe this can help somebody.

2012-04-04 08:06
by uruk


You should use Localization Suite to manage your translations. This way, you can let loc-suite to scan changes in your original .plist file and tell you which ones are translated and which ones are not. Loc-suite can also update your localized .plist file and remove dead entries.

This question is slightly off topic at stackoverflow though.

2012-04-03 23:01
by He Shiming
Thanks for the link, but the old localized files where not recognized - uruk 2012-04-04 08:07