0

I have a ViewController and it contains a xib, I have clicked the localize button in xib file inspector view. Then xcode popped a view with confirming message "Do you want to localize this file?", and there are two options can be chosen, "Base" and "English".

I chose "English" and "Localize". Then the file inspector view shows this:enter image description here

I made the right label become "Localizable strings" from "Interface Builder Cocoa Touch XIB". So it popup an alert to ask me whether to convert xib to strings file.

After I click convert button, my viewcontroller.xib has been convert to a strings file and xib file was removed from working copy by Xcode, thought it runs very normally and nothing crash.

But if I want to modify my view, how can I do that? Is there any way to bring xib back from strings file?

Thank you very very much.

**FINALLY:**The mainly thing is when I confirmed to convert xib to strings, Xcode has moved the xib file to the trash. And I think there is no way to convert strings to xib. Thanks Johny kumar

  • Just reset HEAD to an earlier commit, simple. – trojanfoe Nov 04 '15 at 08:50
  • @trojanfoe But my Project wasn't under any version control. Can I sovle this in another way? – Erbing Zhang Nov 04 '15 at 08:55
  • Huh? How can you work on project outside of version control? It's impossible. – trojanfoe Nov 04 '15 at 08:55
  • use this command on link :http://stackoverflow.com/questions/8343313/ios-localizable-strings-file-for-xib-files – johny kumar Nov 04 '15 at 09:03
  • @johnykumar Thanks. But it doesn't work for me. – Erbing Zhang Nov 04 '15 at 09:19
  • have you executed that command in same folder where your project is?check for language en.proj should have .strings file and it will convert that to xib file. – johny kumar Nov 04 '15 at 09:28
  • @johnykumar Yes, but it just post "unrecognized commandline options: "en.lproj/asViewController.xib" and "Base.lproj/asViewController.xib". Either unrecognized options were passed, or multiple input documents were passed when only one was expected." – Erbing Zhang Nov 04 '15 at 09:34
  • find in your trash you may get your xib in there. – johny kumar Nov 04 '15 at 09:43
  • @johnykumar Oh!!..I have tested it and found the xib was really moved to the trash.!! But the key file has already been deleted by cleaning the trash incautionsly. Thanks very much.!! – Erbing Zhang Nov 04 '15 at 13:14

0 Answers0