I have a Storyboard in Xcode 5.1 with a base Localization of English, and a second Localization in French.
When I'm using the Xcode Storyboard editor the strings are shown in English, as expected. Is there any way to make Xcode display the Storyboard in my other localization (French)?
I don't want to change Mac OSX's language, I'm hoping there's an option in Xcode somewhere.
EDIT: I have this in my resources folder
If I double-click Main.storyboard then the storyboard opens showing English (base language), as expected.
Is there a way to view Main.storyboard, but showing the text displayed in Main.strings?
EDIT: I've since discovered (thanks to this tutorial) that there's a 'preview' option in Xcode. To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview. This shows how the ViewController will look in landscape/portrait 568/480 high modes. Very handy, but still shows everything in English.
If only this'd let me select a localization, it'd be a great way to check the text layout works in different languages..
You have SwiftUI enabled in your project, which does not use storyboards anymore. Your layout is inside the ContentView. swift file. If you do want to work the old way, with storyboards, you should uncheck 'Use SwiftUI' in the project creation screen.
storyboard and choose Refactor to Storyboard ... from Xcode's Editor menu. Xcode prompts you to name the storyboard which the Note View Controller scene is moved to. Name the storyboard NoteViewController. storyboard and click Save.
Yes you can do that! Here are the steps you can take to do so: Go to your current Xcode project -> Storyboard, click on the + sign (right upper corner) and search for Hosting Controller (just like you would for a button or label). Drag Hosting Controller to your Storyboard.
I believe that Xcode is not prepared to show localized storyboards in Interface Builder when using string files. However, it allows for you to convert formats quite easily. Select your storyboard file and in the utilities panel, select the language you want to preview:
Change the "Localizable Strings" to "Interface Build Cocoa Touch Storyboard":
You should now be able to select the French storyboard file and preview it within IB.
Once you are done, you can convert the file back to "Localizable Strings" reversing this procedure, or using your source code version control system. Then you can update the base file with any necessary adjustments, and verify it is to your liking using this method again.
Xcode 6 now includes a feature to do this.
From What's New in Xcode - New Features in Xcode 6:
Preview in Interface Builder. While designing in Interface Builder, the preview assistant can show how the interface appears in other languages. You can see how your interface responds to longer or shorter languages.
Hurrah!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With