Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Xcode localization workflow using single storyboard

Maybe this is a hot question, but I had a strange issue (or more probably it's me :) ). I'm trying to use the new localization workflo in XCode 4.5. The procedure I'm using is the following:

  1. Create a project
  2. Localize MainStoryboard with the base language.
  3. Add new language.

So now I have three folders, for example:

  1. base.lproj
  2. en.lproj
  3. it.lprj

I have MainStoryboard.strings in en.lproj and it.lproj.

This is cool...

I noticed that .strings files are not auto filled while I'm modifying the layout (add, remove buttons, labels etc.).

I noticed that the .strings files are filled just when I localize the storyboard. To add new changes I need to remove localization and re-localize.

Doing so I loose my previous changes, i.e. I need to translate all the strings again.

What is wrong in my procedure?

I alos tried using a .sh in the Build Phases section, that auto-update .strings files, but the problem is the same, each time the files are update I loose my translations... (this sounds logic).

Thanks

like image 520
Altair Jones Avatar asked Dec 05 '25 19:12

Altair Jones


1 Answers

The trick is to convert your localized strings file to a localized storyboard file in the Localization area of the File Inspector.

Localization area of the File Inspector.

After that you can convert back to a strings file and you won't lose your translations.

like image 162
Florian Avatar answered Dec 07 '25 18:12

Florian