Xcode 6: iOS doesn't use storyboard localizations - ios

since I upgraded my Xcode project to Xcode 6, my storyboard localizations don't work.
I have:
A base localization as storyboard file (which is basically English)
Four string files: English, German, French and Japanese
Until Xcode 5 those worked without any problems.
But since Xcode 6 I have the following situation:
The application only uses the labels used in the base file when running on a device/simulator
BUT my Localizable.strings file, which I have in different languages for all non-storyboard related localizations, works perfect. (So in the end I have a mixture of languages while running on a device)
Since Xcode 6 there is the possibility to see the localizations as a preview screen in the assistant editor. Everything works there.
So: the only thing that doesn't work is the localization of the storyboard while running
Does anyone else have the same problem and is there a solution?
Update: With Xcode 6.1 GM the localization on the actual device is correct now but the simulator is English only, even if I choose another language in the simulator.

I am experiencing the samen problem. I have been struggling for hours getting my localized storyboard to work in Xcode 6.0, until I read your question. Then I tried the second GM of Xcode 6.1. There, my UILabels were localized properly on the device (not in the simulator). However, my UITextView did not get localized, which took me another 30 minutes to figure out.
Hopefully, this will be fixed soon.

I thought I had the same problem as I couldn't see any of my translated texts appearing in the simulator. I tried using a dummy new project and it worked which made me not so sure about what the problem was.
Then I decided to use a dedicated editor for the translation. After exporting, translating the files via the editor and importing them, I could see the correct texts in the iOS simulator. So I guess that it was the way I edited them manually which caused the issue.
FYI, the tool I used is https://poeditor.com

I've been experiencing the same issue. The solution is: you need to clean (shift-cmd-k) a project first, then you build and run it.

Try to switch localization files to “interface builder storyboard” instead of “localizable strings”. For some reason in my project Storyboard.storyboard works, but Storyboard.strings doesn’t. Probably xcode bug.

Related

Localization not working on ipad but working on iphone

I have 2 storyboards each with 2 StoryboardName.string (English and French) and a separate Localize.string that contains the string for the view controllers.
When I run the app on an iPhone it's picking the localization files correctly, but on the iPad it keeps the declared values in the storyboard without useing the values fron the files.
I have tried to delete and install the app multiple time, also I have tried to set a parameter from the scheme configuration, I checked the id's from the localization file to be in the storyboard (and they are). Nothing work...
I modified the localization files but the iPad it's not picking the changes.
How can I force the iPad to chose/use a localization file?
see the target is properly set or not on right side window
The problem was that an " was missing from the storyboard.string files and xcode was not throwing an error. Also I have changed in the scheme at option the application language and the application region.
Helpful tutorial:
http://rshankar.com/internationalization-and-localization-of-apps-in-xcode-6-and-swift/

Enabling Double Length Pseudolanguage doesn't work in Xcode 7.3

I'm trying to use the Double Length Pseudolanguage to test potential layout problems with other languages. I've enabled Application Language -> Double Length PseudoLanguage in scheme editor but when I run the app in the simulator, none of the strings were doubled. I've tried preview editor in Storyboards and the strings stayed the same.
FYI: I have localized my app to two languages already, I have a Base language (English) and pt-br (Portuguese). All of my hardcoded strings were changed in code to use NSLocalizedString.
Try testing it on a real device.
Looks like this is a bug of the simulator on newer versions of Xcode.
This might sound completely unrelated to the topic, but believe me, I read the question correctly.
If you use AFNetworking pod, go to AFURLSessionManager.m -> _AFURLSessionTaskSwizzling implementation and comment out the line [localDataTask cancel]. If you use CocoaPods you might get a warning that you have to unlock editing of the file. That fixes it for me.
Having the same issue both with Xcode 7.3 and 8 Beta. If you run on iOS 8 simulator this seem to work. Not ideal, but better than nothing.

Localizable string not found in strings table in iOS 9

I work in a company that has an app in production with a localization bug in iOS 9 only. The app shows the key of the localized strings, not the values. Apparently, it can't found the corresponding string in the table. On iOS 8, the app works fine.
I don't know the source code well, but I made sure the file Localization.strings is there, in the right bundle, with the correct target. I'm pretty confident the resource is there, because of tests I made and mostly because the strings are there in iOS 8!
I looked for changes in APIs in iOS 9 but couldn't find anything related to my issue. I also ran the plutil command on all the .strings files and I got OK for all of them.
Any clue as to where to look?
It turns out the app was using multiple Localization.strings file for specific localizations (tweaking the bundle and Localization system). Deleting all those files (with duplicated names) and replacing it with another system (a plist file, mainly) made it work correctly.
It seems obvious there was a conflicting name issue here, but I'm still puzzled by the fact that it worked with older iOS (8 and under).

Modification of localized storyboard - convert to base storybord

My problem is that I have storyboard which support multiple languages (6). Since app was created before iOS6 I have 6 versions of storyboard.
Now UI has been redesign a bit (mostly order of views has been changed) and I did changes only in English version.
Now how to propagate those changes to other languages with minimum effort?
I've noticed that since iOS6 and XCode 4.5 I can get rid of multiple storyboards and just provide translated strings for other languages.
I've found this answer and this tutorial, but this refers only to new projects nothing about how to do this for old big projects.
Ok I've got it!
Enable "Use Base internationalization" for you project (just like in this answer). XCode will ask to select base language (probably you will select English).
Select root storyboard (the root version which contains versions for all languges) in project navigator.
Then in "view/Utilities/File inspector":
For each language change option from "Interface Builder Cocoa Touch Storyboard" to "Localizable Strings":
XCode will ask to confirm conversion.
Before test UNINSTALL APPLICATION FROM DEVICE. Simple run from XCode will not remove old storyboard files from device and you can experience some strange problems (since I did some changes in UI I've experienced some unhandled exceptions).
Verify that everything works and everything is translated properly. Add missing translation if necessary.
This procedure did work for me, with this big hiccup described in step NR 4.

Can Xcode 4.6.x and Xcode 5 share project directories?

After installing Xcode 5 I immediately noticed it bringing up the windows/projects from a previous Xcode 4.6 session. Of course this is expected behavior if I am upgrading, but since this is only a preview/beta release it made me a bit nervous....
Is it reasonably safe to let Xcode 5 and Xcode 4.6.2 point to the same project directories (maybe not while running simultaneously?
Yes, it is perfectly fine and I have been using mainly XCode5 but switching to 4.x every once in a while. The only thing to be careful of is when opening some files, it may ask if you want to convert them to XCode 5 format. If you do, you will not be able to open that file in XCode 4.X anymore (or so the warning says, I've never clicked yes).
JSdodgers's answer is perfectly valid.
Upgrading XIBs is a big pain.
Note that you won't be able to use every new XIB feature in Xcode 5 if you don't use the Xcode 5 format.
The best solution is to have a separate branch (git or svn) for your iOS 7 code.

Resources