How to localize an iOS storyboard How to localize an iOS storyboard ios ios

How to localize an iOS storyboard


In iOS 6 there is a Project setting under the Info tab that says "Use Base Internationalization". If you check the box, it will pull all of the strings out of the Storyboard and into internationalized .strings files.

This way you don't have to have multiple copies of the Storyboard.

enter image description here


As of iOS 6 you can decide to use Base Internationalization: All storyboard and xib/nib files exist only once in a folder named Base.lproj. The localization of the GUI elements is placed in related .strings files in each localization directory.

For example "MainStoryboard.storyboard" will be placed in Base.lproj. An associated file called "MainStoryboard.strings" is placed in en.lproj and whatever localization you apply.

This is really very handsome, especially in combination with layout constraints!


You can do the localization by changing the titles of the UI elements in code:

self.title = NSLocalizedString("News", nil);

If you want to localize your app in Dutch for example, you would have this in Dutch.lproj/Localizable.strings:

"News" = "Nieuws";

You can then do this for every UI element and language.