Sane localization workflow using Xcode 6, iOS 8, Storyboards and xliff?

We’ve resorted to connecting every label to an @IBOutlet and setting its translation in viewDidLoad() with NSLocalizedString.

You are doing that right. Seriously. Wrap your development process around it and you’ll get way better off than trying to adopt the mess that the Storyboard localization evolved into.

It solves pt.4 – you decide what you put in the Localizable.strings

It solves pt.5 – comments are there by default, for everything that you decide to be localizable. Now to be honest, XCode7 has added a possibility to add notes to resources. Don’t use it. For some reason only known to Apple, it is not available for all types of resources. You can’t annotate e.g. table headers and footers. More on that later.

I recommend making your own NSBundle.localizedStringForKey wrapper (macro) which provides the value. NSLocalizedString sets value to empty string, essentially forcing key to be used as the fallback translation content. Of all the already existing questionable macros, NSLocalizedStringWithDefaultValue takes the value but also all other 4 required parameters – not something you would like to use often.

Step 10 is caused by you trying to import a Base localization – the fact that it’s english does not make any difference. If you want to “translate english” (i.e. professional correcture), you must add english as another standalone localization on top of Base. Technically it boils down to the Base xliff missing <file target-language> and <target xml:lang> properties. Due to some strange xliff mess similar to yours, i had to add those once manually. You don’t want to do that 🙂

Re apostrophe glitch: iOS localization is an unreal garden of wonders, but i’m prety sure it’s not THAT unreal 🙂 Try opening the file in some hexcode displaying editor – what XCode renders may be quite different from what the file really contains.

  1. … even something web based

That’s Crowdin for us and it nicely shows everything wrong with Apple’s idea of Storyboard localization. Translators need 3 things to do their work professionally: context, context and context. Apple seems to think that translators will gladly install the app, play with it and ask questions to get the context. Because, by default, there is no human context in xliff export. Now with Xcode7, you can add notes, but weirdly not everywhere. Even where you can, your note is appended at the end of already long <note> string with machine context – understandably needed for storyboard import matching, but useless and obstructive for the translator. Furthermore, in reality, the translator is a pro agency, or a language enthusiast. Even if you had a luck with properly equipped enthusiast, or you paid the agency premium for getting an extra customer care, you enter The Hostile Desert Of Beta Distribution Options. Apple’s funny Testflight reincarnation will either need the translator to register as an Apple developer, or waiting for Apple’s beta review – depending on how early in the app life you need the translation.

BTW i like your blog. Sometimes i feel like dumping my sourness and misfeature fatigue too, but never got as far as you 🙂

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)