Tuesday, 25 September 2012

Localisation in XCode 4.5 drives me crazy [Fixed]

Don't know why, after upgraded to XCode 4.5, testing localisation becomes a nightmare...

First I was stuck due to can't find the plus/minus buttons, finally found that it's been relocated after XCode 4.4, as I was on Xcode 4.3.3 before the upgrade, so wasn't aware about this.

Then found that if I change the language in simulator to Spanish, when it runs it's still in English. Deleted app from simulator, clean and re-run again, it works, then tried again, back to English again. Similar problem happens with the other languages too... I start wondering is adding multiple language support really worth the effort as I felt getting crazy after all these confusing, almost random test results...

Luckily, I found this work around by "VictorT". Listed below for your reference. I think it's adding extra step to copy the localizable.strings file over and to be honest don't really understand why, but most importantly - this fixed my problem!

  1. Remove application from device
  2. Select root node of project tree to get project's properties
  3. Select "Build Phases" tab
  4. Click "Add build phase" and select "Copy files"
  5. Select "Resources" in "Copy files" view
  6. Add Localizable.strings file
  7. Perform "Clean" for the project
  8. "Build and Run"

3 comments:

  1. If you need a good tool to manage software localization, I totally recommend the localization platform https://poeditor/com/

    It's perfect for collaborative translation and crowdsourcing projects.

    ReplyDelete