Is it possible to update a localized storyboard's strings?

前端 未结 14 1309
星月不相逢
星月不相逢 2020-11-28 00:13

I localized a part of my application with creating a base.lproj storyboard and 3 string files for it. It was a month ago and after that I added new view controller to app, b

14条回答
  •  一向
    一向 (楼主)
    2020-11-28 01:11

    This one is not for everybody, but it requires no additional tools in the terminal and it's easy for small manual changes. (Do not consider this when you want to automate your process.)

    Step 0: Storyboard language setup

    • Base (with english texts)
    • English (localizable strings file does not exist because the base file is english)
    • other languages (localizable strings files)

    This step is done only once.

    Now when I add something to the storyboard I do the following

    Step 1: add the English localizable strings file

    just mark the English line item.

    This creates a completely new english localizable strings file with all the lines

    Step 2: copy the new line items into the other language files

    and translate them

    Step 3: unmark English, remove the corresponding localizable strings file

    the file was only needed to get the new line items

    This is an easy and fast process, everything is done in the storyboard editor

    Edit:

    This process works very well with small storyboards. For example, I have a tabs based project and I have a storyboard for each tab.

    Search for "storyboard reference" to find tutorials.

    Good example: Storyboard reference in Xcode, where should we use it?

    So each small storyboard only has a few strings to localize.

提交回复
热议问题