31

I'm trying to unlocalize xib and storyboard files, and keep all strings in Localizable.strings. How do I do this in XCode?

I've tried to uncheck all languages in the File Inspector, but if I remove the last language the whole file disappears.

enter image description here

A file that is not localized looks like this:

enter image description here

Unlocalized files wont appear when you add a new language or when you export localizations with xliff.

Toydor
  • 2,095
  • 4
  • 25
  • 43

2 Answers2

57

This is a pretty stupid way, but the only one I found out working if you want to restore the default:

  1. Move the xib or Storyboard files from the Base.lprojfolder to your main project folder back (within the Finder).
  2. Delete the reference of the XIB/Storyboard files (in XCode)
  3. Reimport all of them back to your XCode project and you are done
zero3nna
  • 2,524
  • 28
  • 28
2

In Xcode create a Localizable.strings file. In Xcode select the file and on the right panel, checkbox the languages you want for it. Then copy/pasta the files/strings into the place you want them. Then remove the old languages for the xib/storyboard.

enter image description here

StackUnderflow
  • 2,014
  • 1
  • 17
  • 27