Andrew Duncan
Andrew Duncan

Reputation: 3753

Xcode Base Internationalization with no Main.storyboard

I'm trying to follow the tips in Apple's I18N and L10N Guide. I have a pre-existing project from which I have (long ago) deleted the Base.lproj folder. Why? Because I have no Main.storyboard or LaunchScreen.xib. Both of those things are handled programmatically.

However I do have a large number of subsidiary storyboards, including a WatchKit Interface.storyboard. When I click the + in the Project (not target) Localizations section, Xcode presents a dialog that lists only the Interface.storyboard file. Not any of the many others.

How can I persuade Xcode to help me localize the other storyboards? Can I do this all manually? As usual, I am sure it is my mental model that needs refinement.

Upvotes: 1

Views: 588

Answers (1)

Andrew Duncan
Andrew Duncan

Reputation: 3753

This is an example where configuration yields convention. That is, if you customize your folder hierarchy, Xcode can adapt and implement its naming conventions.

  1. Select storyboard file in left pane (Project navigator)
  2. Click Doc icon (File inspector) in right pane
  3. Click Localize...

This will create a new Base.proj folder inside whatever folder holds the storyboard. If you are like me, you have done lots of folder-factoring. Xcode goes along with this.

Then you go back to the Project Localizations section and click + to add locales. Xcode creates extracts the strings from your storyboard and creates new folders for the corresponding .strings files.

Upvotes: 2

Related Questions