I Added a Localization in Xcode, Removed It and Now My Storyboard Is Gone

I added a localization in xcode, removed it and now my storyboard is gone

For the storyboards in the trash, I would try opening them both up and seeing which is correct. And for using .strings files instead of having to localize the whole storyboard, when using base internationalization you have an option. You can change it by changing the option here under localization (this is under the left pane when you open the storyboard)
Sample Image

Change the option from interface builder to localizable strings, and you don't have to use the storyboard. The difference is in the interface builder one, you would have to edit all labels and anything you want to localize like you would edit any other storyboard, which can be tedious. The strings file makes it easy by basically giving you a list of whatever text you have in your whole storyboard and letting you change what they say by translating the text, instead of having to edit the whole storyboard file.

Xcode when adding localization not all storyboards are found

You need do following steps :

  1. First you need to create new string file.
  2. after select this string file and In file inspector and click on Localize button .
    then you can see string file along with storyboards.

Sample Image

Is there any way to restore Main.storyboard after deleting it during localization process?

This is why source control is so important. We have all been down this road before and learnt the hard lesson of not practicing source control and not commiting often as possible. It takes a few minutes to setup and can save you hours / days / weeks. It's saved my butt a few times!

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

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.



Related Topics



Leave a reply



Submit