Henry95
Henry95

Reputation: 623

xCode won't list storyboard or info.plist for localization

I'm trying to localize an iOS app. According to all the tutorials, one of the first steps is to add localizations to the info pane of the project editor. When I get there, "use base internationalization" isn't checked by default. When I click it, the window "choose files and reference language..." comes up as expected, but it doesn't list any files--i.e. there are no choices for files to localize.

The app builds/runs fine. My storyboard is named "main.storyboard" and is in the project's main folder, so I'm not sure why xCode wouldn't recognize the file.

Of note, the project has gone through a re-naming, and I've been through a couple abortive attempts to localize after adding a language without the base, with the idea of adding the base later. But it looks like that takes me off track, and I had to undo those attempts; in the process, I manually deleted the .lproj folders that had been created.

Any ideas on what the problem is?

Upvotes: 2

Views: 1266

Answers (1)

tsafrir
tsafrir

Reputation: 1731

Important: Before you do any actions, keep backup of your project folder.

When you select use base internationalization, Xcode will look for User Interface files (Storyboard, Xibs) inside any *.lproj folders in your project. But in your case it won't find any *.lproj folder.

Steps to fix:

  1. Create a "en.lproj" folder next to the storyboard using the Finder. Then move one UI file like the main.storyboard (or other UI file) into the new folder.

  2. On Xcode, relocate the storyboard file. One way to do it is to remove the old reference to the storyboard file. (will be in red) and re-add it to Xcode. Now you will see that this file has "English" localization selected.

  3. Retry now the 'use base internationalization' button and it should suggest you to move the main.storyboard to the Base.lproj which it will create for you.

Upvotes: 8

Related Questions