theomen
theomen

Reputation: 919

Multi language localization storyboard support issue

I have an issue with my project storyboard. I have added two localizations more to storyboard, so now I have three storyboards: spanish, english and basque. All of them depending from the main one:

enter image description here

Now I have the issue that I have to update all changes manually to all to storyboards, because if I do changes to MainStoryboard, the others are not updated with this changes.

How can I modify all storyboards at the same time?

Thanks

Upvotes: 6

Views: 2976

Answers (2)

Scott Marchant
Scott Marchant

Reputation: 3637

Here is a really great tutorial for automating changes from one storyboard localization to all the others:

http://danielsaidi.wordpress.com/2012/08/20/localization-in-ios/

http://www.youtube.com/watch?v=cF1Rf02QvZQ

From what I gather, the solution involves adding a python script to the end of the build that syncs the storyboards and generates string files.

Go to the links for a more detailed solution. They said it better than I can.

Upvotes: 6

Michal
Michal

Reputation: 15669

You could either take out all the strings from Storyboard and put them in localized set of strings. Then you would have to do everything in your code like this:

self.label = NSLocalizedString("LABEL_STRING", nil);

or you could open the Storyboard as an XML file and do it there maybe a little faster. But other than that, no it is not doable, bcs the Storyboard localization serves you for polishing your localization. Say you have a screen called "HOME" and then (using google translate), you have "HASIERA" in basque. The problem here is, that in basque it's longer, so you need to adjust the GUI elements so it fits the screen perfectly. What could happen is that the string would be cut off, which we don't want to happen. That's why you need to do Storyboard localization step by step. If you don't need it, use strings file instead...

Upvotes: 2

Related Questions