I have localized two sets of xibs and put them in my project navigator as shown in the picture below:
My Localized.strings files are working fine, but the xib files are sometimes selected incorrectly. When I set the device language to French, I see the English xib view. When I set the device language to English, I see the French xib view.
I removed the xib files from the project, deleting the references only, and then dragged them back into project in the same places, as the picture shows. Right at the moment, I'm only seeing the English version, regardless of which language I have the device set to.
Is there something anyone can see that I'm doing wrong?
(I have read advice, like this one, on not using separate frames for each language. I may switch to that at some point, but right now, I just want to understand what is wrong with my set up.)
Update
Here is the file organization for the en.lproj folder. The fr.lproj folder is set up the same way. These are inside a folder called Resources.
Update - Final Result
I experimented with the localization settings for my xib files in the panel at the right.
and finally noticed those disclosure buttons when I had two or more languages selected for localization. Clicking on the disclosure button revealed a xib file for each language. I then had redo the localization for the foreign language xib. (I probably could have copied and pasted from the existing xibs.)
So the files are now organized like this:
The project navigator shows the en.proj and fr.proj, but are the files really localized in folders on the file system? In XCode 4.2 the localized files will show there localization after the file name in parentheses. I do not see that in your example. Here is what my localized resources look like.
To make the XIB localized you need to put them into folders on the file system with the appropriate names. It is easiest to do this from the file inspector.
Don't know if this helps?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With