Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I display alternate languages in Interface Builder? (Xcode5)

The iOS project is using Base Localization with localizable strings set up for the Storyboard in English and German. Everything is working properly when I change the language for the simulator, but some of the text is getting truncated in German. I would like to view the German text in Interface builder so that it's easier to fix the constraints on the text labels and fields.

It seems like this should just be a view setting or something, but I can't seem to find anything obvious.

like image 212
Anthony F Avatar asked Apr 16 '14 16:04

Anthony F


1 Answers

Looks like this wasn't possible for Xcode 5, but will be part of Xcode 6:

To preview a localization in Interface Builder

  1. In project navigator, select the .storyboard or .xib file you want to preview.
  2. Choose View > Assistant Editor > Show Assistant Editor.
  3. In the assistant editor jump bar, open the Assistant pop-up menu, scroll to the Preview item, and choose the .storyboard or .xib file. If a preview of the app’s user interface doesn’t appear in the assistant editor, select the window or view you want to preview in the icon or outline view.
  4. In the assistant editor, select the localization you want to preview from the language pop-up menu in the lower-right corner. A preview of the localization appears in the assistant editor. If you select a real language, strings that do not need to be localized or need to be localized, but currently are not, appear in upper case.

quoted from "Testing Your Internationalized App"

like image 137
Anthony F Avatar answered Nov 15 '22 00:11

Anthony F