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

GeLB picture GeLB · Feb 26, 2013 · Viewed 77k times · Source

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, but this controller's buttons and labels not appear in string files

Is it possible to update this 3 storyboard attached string files or I must add new strings translations programmatically with using NSLocalizableString and Localizable.strings?

Answer

Tha Leang picture Tha Leang · May 1, 2013

There are two options:

Option 1

Xcode can "reload" the file by converting the file to either an [Interface Builder Cocoa Touch Storyboard] file type or a [Localizable Strings] file type.

  1. Select your base storyboard file from the Project Navigator
  2. Find the Localization section in the File Inspector
  3. If your file is currently a [Localizable Strings], change it to [Interface Builder Cocoa Touch Storyboard] or vice-versa.
  4. Xcode should have converted your storyboard to the current version, while preserving your old localization efforts. Here you can change the file back to the original file type if you would like.

Option 2

Use ibtool to extract the strings in your storyboard.

  1. Open the Terminal application

  2. Locate your Base.lproj directory

  3. Use this line to extract the strings:

    ibtool MainStoryboard.storyboard --generate-strings-file file_name.strings

  4. After ibtool extracts the strings to file_name.strings, you can copy and paste it to your original .strings file

Visit for more info: https://conyac.cc/business/columns/localization_guide_ios