Вопрос

Not able to localise the project. I by mistake deleted the existing english options. So though the English.strings file is there in resources its not showing up as options anywhere. What should i do to revert back ?

enter image description here

enter image description here

Это было полезно?

Решение

When a project is created, the Main Storyboard and the InfoPlist.strings are localised by default. When deleted from the Info(as shown in first pic), your storyboard and infoPlist will disappear from the Navigator area. However, if you check the project folder, the default language 'lproj' folder(in my case, en.lproj) will still be there.

*Add the files back to the Xcode navigator area (InfoPlist.strings will go under Supporting files).You'll get back the languages under the info.

*Create a Localizable.strings file under Supporting Files. In its File Inspector, click 'Localize'(if I'm not wrong!) and you'll get the option for the default language.

*Finally, go to the Info(first pic), add any other language and Xcode will show you 3 files to be localised.

Hope this helps!!

P.S. - I checked this in Xcode 4.5. Please confirm whether this works in Xcode 5 too.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top