3

I have the Storyboard, Base language and translated all the app into another language, so far it's working fine.

I would like to know, when I add new elements in the Storyboard that needs to be localized, how do you keep the strings file up to date.

I tried a suggestion, which is to switch this: Strings to Interface Builder Cocoa Storyboard and then back to Localizable Strings, however the results are not good, most of the translation is lost and switched back to the Base language.

Is there a handy tool to regenerate and merge the strings in Storyboard? I tried few scripts but they always ended up wiping everything.

John Smith
  • 1,726
  • 2
  • 18
  • 30
  • Possible duplicate of [Is it possible to update a localized storyboard's strings?](http://stackoverflow.com/questions/15094259/is-it-possible-to-update-a-localized-storyboards-strings) – Jeehut Feb 14 '16 at 23:28
  • I posted a clean solution to this problem here: http://stackoverflow.com/a/35398661/3451975 – Jeehut Feb 14 '16 at 23:30

1 Answers1

2

I've modified a skript that i've found here on stackoverflow to be able to also handle the localized strings in storyboards.

The skript only adds new key-value pairs to the .strings file, but keeps the ones that you have already translated.

You can get it from my github, for more details about my localization workflow read my blogpost

Community
  • 1
  • 1
MeXx
  • 3,357
  • 24
  • 39
  • Thanks, but I assume my folder structure is a tad different. I'm using a workspace, then in the MyApp folder I have the folders Base.lproj, de.lproj and so on, each containing Main_iPhone.strings and Localizable.strings. When I run the script (--interface) it creates the two strings files in the root folder. – John Smith Sep 12 '13 at 15:45
  • You can specify the output path with the -o option, i run update_localization.py one time for each localization _tools/update_localization.py -i Zurvive/ -o Zurvive/en.lproj/ --ignore 3rdParty --interface_ _tools/update_localization.py -i Zurvive/ -o Zurvive/de.lproj/ --ignore 3rdParty --interface_ – MeXx Sep 12 '13 at 21:00