Localizing Nib/Xib files is tedious and error prone. You want to reduce the manual edit to a minimum. (Basically, just the traslation.) Oversights and other weirdness may still happen though. This is the process I follow.
- Save Nib in
en.lproj
folder. - In Xcode, select the Nib, open the Utilities pane and select the first tab (View > Utilities > File Inspector) and add a localization (e.g. Italian). Xcode will create a new file in the right location (
it.lproj
folder). - From Terminal:
# extract all strings from original nib file $ ibtool --generate-strings-file text.strings en.lproj/MyNib.xib # open file in Xcode, translate all the strings and save $ open text.strings # create a new nib exactly like the original but with the localized strings $ ibtool --strings-file text.strings --write it.lproj/MyNib.xib en.lproj/MyNib.xib
Finally, Run the app. If the localized Nib is not displayed, it’s because iOS is holding a cache of the Nib file. Remove the app from the simulator or the device and reinstall it. Now it should show the new localized Nib.