Localization problems when migrating to Xcode 4

Discussion in 'Mac Programming' started by monsieurpaul, Mar 24, 2011.

  1. monsieurpaul macrumors regular

    Oct 8, 2009

    I have developed an app with Xcode 3.2.5. This app is localized (English and French).
    I have migrated to Xcode 4, added a .xib file in my app and localized it and now it's a mess: although build is successful, the app quit on startup because mainmenu.xib is missing.

    If I switch my language to English in the System preferences, the app run fine, so it seems to be a problem with the french localization. I found that Xcode added a new folder "fr.lproj" in addition to the already existing "French.lproj". It seems that Xcode doesn't look in French.lproj anymore and that's why it can't find mainmenu.xib.

    I am trying to copy/paste files from one folder to the other but with mixed results. I'm afraid I will have to remove all localizations and start from scratch in Xcode 4.
  2. DaveP macrumors 6502


    Mar 18, 2005
    French.lproj is the old way and fr.lproj is the new, recommended way. I'm not surprised you are having mixed success just copying and pasting as I've also tried that with limited success. It shouldn't be much difficulty to re-add the localizations assuming you save a copy of your existing ones. Then you can just use the finder to copy your localized files over the new XCode generated ones. I would think that would work.

    I will give you a heads up and hopefully you have more luck than me. I had incredibly crashing problems with localizing images in XCode 4. I would click to add localizations and XCode would frequently crash. It would copy the file to the en.lproj but none others. Then upon re-open if I selected the messed up localized file it would crash again. I eventually got stuck in a crash cycle and loaded it up in XCode 3 to create the localizations for a couple images and then was able to get it to load properly in XCode 4.

    Oh, and I assume you did a clean and build.
  3. LocalVersion macrumors newbie

    Mar 30, 2011
    Barcelona, Spain
    Did you try AppleGlot?

    You might want to try AppleGlot to update your old localized xibs/nibs. You should populate the "_NewBase" folder with your new Xcode 4 English files, the "OldBase" folder with your previous Xcode 3 English files, and finally the "_OldLoc" folder with your old French translations. Most (if not all) the translations should be automatically leveraged. Let me know if that works.
    Best regards,
  4. monsieurpaul thread starter macrumors regular

    Oct 8, 2009
    Thanks for the info, I will look into it.

    In fact I managed to solve my problem by removing / adding my Xib files in Build phases.

Share This Page