The best time to get localize your app is either just before your 1.0 release is submitted to the App Store, or just after the 1.0 release. Earlier and you run the risk of needlessly localizing things that are going to change anyway; later and you're missing out on sales.

Enable Base Internationalization of Resource Files

Base Internationalization is a feature of iOS and OS X which means the you don't have to maintain separate .xib or .storyboard files for each language. Instead, the base resource file controls the layout and a separate .strings file provides the localized text for each new language.

For each .xib or .storyboard file, in the file inspector, ensure that localisation is enabled:

screen1

Select the project and ensure that the 'Use Base Internationalization' checkbox is set.

screen2

Ensure any English strings in code use NSLocalizedString()

Search through your entire project (Cmd-Shift-F) for @" and replace any raw strings with NSLocalizedString(string, comment). If the string is a complete phrase, it's usually fine to leave the comment nil. However, it's good practice to include a comment describing the context briefly.

Add a new Localization Language

Select the project and click the '+' button and select the first language to add.

screen3

Add a Localizable.strings file

Add a new .strings file to your project (Cmd-N, Resource, Strings File). The file should be named Localizable.strings.

With the file selected, click Localize… in the File Inspector and select English.

screen4

With Localizable.strings still selected, check the extra language in the localization panel.

screen5

Use Linguan to update translations

Launch Linguan and open the .xcodeproj file. You should see a screen like this:

screen6

Click 'Scan Sources' and the NSLocalizedString() instances in your code will be extracted as entries in the .strings files. You can edit the translations directly in this screen.

screen7

If you're fluent in the new language, you can continue translating each token in turn (you might find the Wizard mode more convenient for this). Click File, Save All once you're done.

Exporting packages for external translators

If you'd prefer to use a professional translation service, Linguan can package up the required tokens for each language. Click Export and select the desired language:

screen8

Send the resulting files to your translation service. Once you get back the translations, you can import directly into Linguan and it will save the updates back into your .strings files.

Note: when you're preparing to localize your app resources, don't forget your app store description and keywords. A good approach is to create a Marketing folder with a subfolder for each language (en, de, …). Create a description.txt and keywords.txt in each one and keep them under source control.

Published on Aug 3, 2014

© Copyright 2009-2014 Peer Assembly Ltd.