5
votes

I have the following file structure for localization.

A.xib

->A.xib (Base)

->A.strings (Spanish)

->A.strings (English)

Since it is "Use Base Internationalization". We can expect to have only one xib file and required strings file for the localization.

But, soon as i convert this strings file to .xib (where for each language we have .xib file. This was the case before Base Internationalization). Things start working the iOS simulator and device responds to such changes.

Note:- I had also tried to reset the simulator , clean and created the build but no success.

Don't know why localization fails when I use .strings file for localization.

Any help appreciated for a , small bug consuming more time on Xcode IDE and eating up development time.

2
good question. i have exactly the same problem. localization is a total mess in XCode.Michael
Did you ever find a solution?user-44651
No. I used .xib. Another fact which I considered while moving from .strings to .xib was that one "word" in language can consume 30 points while in others it can consume 50 pt's.NNikN

2 Answers

0
votes

In Xcode 6 you need to select "Use Auto Layout" in order for the strings file to be used. There is a known problem if you do the following:

1)Your storyboard or XIB uses size classes.
2)The base localization and build target are set to Universal. 
3)The build target is for iOS 7.0

You can use the Localizable Strings to generate a localized XIB file automatically through Xcode, which is what you need to do if you do not enable Auto Layout.

0
votes

It's a bug in Xcode. All you have to do is to convert the Localizable Strings file to an Interface Builder file. You can do that under the Localization section on the interface builder's file properties.