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

14,560

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) enter image description here

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.

Share:
14,560
Andreas
Author by

Andreas

Updated on June 04, 2022

Comments

  • Andreas
    Andreas almost 2 years

    So I wanted to try localizing my app. I had one single Storyboard.storyboard in my project folder.

    1. I checked the "use base internationalization" checkbox and then xcode did something with my files.
    2. I proceeded to add a second Localization
    3. Xcode told me it couldn't create some .plist since it already existed.
    4. I ended up with two storyboards ("Base" and "English" grouped together), which was very strange since the documentation clearly said I would just have to deal with one set of storyboards (when using base intertationalization) and that the other languages would be strings-files:

      Base internationalization, a feature introduced in Xcode 4.5, relieves localizers (that is, translators) of the need to modify storyboards and nib files for each language an app supports. Instead, an app has just one set of storyboards or nib files that is localized to the default language; these storyboards and nibs are called the base internationalization. When you add a localization to an app, Xcode generates a strings file for all the text that each storyboard or nib file displays or includes as an accessibility label or hint. Xcode gives the file the name of the storyboard and the extension strings. So if you have a storyboard named MyStoryboard.storyboard, the generated strings file is named MyStoryboard.strings.

    5. I removed my newly created localization (english) because this was not what I expected
    6. Now all of the storyboards are gone, even though I only deleted one localization

    I have two storyboards in my trash now (one "storyboard.storyboard" and one named storyboardsome numbers.storyboard), but I have no idea 1) which one I should use, and 2) is it supposed to be in some sort of subfolder now since I checked the "base internationalization" option? What about the .plists? I read up on things on this page but it did a better job on telling me where to click than telling me the purpose of the different files, so I have no idea how to reverse this properly

    Update:

    Now it looks like this when I restart xcode: Two base localizations, what does that mean?

    I have no clue where to go from here...