Problem with multilingual localization of storyboards

I have a problem with my storyboard. I added two more localizations to the storyboard, so now I have three storyboards: Spanish, English and Basque. All of them depend on the main:

enter image description here

Now I have a problem when I have to update all the changes manually to everyone for the storyboard, because if I make changes to the MainStoryboard, the rest will not be updated with these changes.

How can I change all storyboards at once?

thanks

+6
source share
2 answers

Here's a great tutorial for automating changes from one localization of storyboards to all the rest:

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

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

From what I'm building, the solution involves adding a python script to the end of the assembly, which synchronizes the storyboards and generates the string files.

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

+6
source

You can remove all lines from the Storyboard and place them in a localized set of lines. Then you will need to do everything in your code as follows:

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

or you can open the storyboard as an XML file and do it there, maybe a little faster. But other than that, no, this is not feasible, bcs Localizing the storyboard serves to polish your localization. Say you have a screen called "HOME", and then (using google translation), you have "HASIERA" in basque. The problem here is that in basque this is longer, so you need to tweak the GUI elements to fit the screen perfectly. What could happen is that the line will be disconnected, which we do not want. To do this, you need to make the localization of the storyboard step by step. If you do not need this, use the string file instead ...

+2
source

Source: https://habr.com/ru/post/917811/


All Articles