Xcode 4.6, target iOS 6, iOS 6.1 SDK
I started with a storyboard that worked well for my application; the lines it contains are in English. I wanted to add French localization. I have done this:
- Added basic localization, which is moved MainStoryboard.storyboard from en.lproj to Base.lproj.
- Added French localization, which cloned InfoPlist.strings (English) and MainStoryboard.storyboard (Base) in fr.lproj.
- Changed several lines (segment headers in UISegmentedControl) in French MainStoryboard.storyboard.
- In the simulator, set the language to French.
- Edit the application from Xcode.
Result : it worked; my changed lines appeared in a running application.
But I want to be all fantasy. I want to do french localization using a .strings file. (This is not just a matter of fantasy, French localization will be handed over to non-technical translators who cannot be expected to master the Builder interface.) So:
- Selected the base MainStoryboard.storyboard in the Xcode navigator project.
- In the file inspector, under the "Localization" section, the French localization has changed from "Interface Builder Cocoa Touch Storyboard" to "Localized Strings".
- An Xcode warning has been received that the French storyboard will be dropped in favor of the .strings file that appears in the assistant editor.
- Made the same two changes; there is no question that they are mistaken strings because they are all commented out as IBUISegmentedControl ... segmentTitles; and the label text does not appear elsewhere in the .strings file.
- Removed the existing (working) copy of the application from the simulator.
- Cancel the application.
Result . The view uses basic (originally English) localization instead of loading French lines.
The conversion to Autolayout did not affect. Removing the application from the simulator did not affect. Removing the Derived Products catalog did not affect. Stack overflow suggested using ibtool to create a .strings file instead of Xcode; the two generated files are identical.
This is unsatisfactory. As I said, I cannot turn a .storyboard file into a non-technical translator. How can I get iOS to accept the localization of the storyboard from a .strings file?
user2068793
source share