Localization tutorial for iOS apps (iPhone and iPad)

Get an online quote

Related Links

This short tutorial will allow you to translate an iOS app into any language, through the following 3 steps:
  1. Pull out the strings
  2. Translate strings
  3. Reimport translations in Xcode

1. Pull out the strings

  1. First of all, when starting a project, it is good practice to begin with the strings separated by the code. The strings should reside in a separate text file ("Localizable.strings").
    If your project already meets this standard, go to step 1.2; otherwise, if you have hardcoded strings in the code, you will need to follow an additional step:
    1. Wrap all the strings in your code with NSLocalizedString using search & replace:
      1. from
        self.label.text=@”Hello world”;
      2. to
        self.label.text=NSLocalizedString(@”Hello world”,nil);
      3. there is also the option to add a comment where needed to disambiguate the sentences and facilitate the work of the translator, e.g.:
        self.label.text=NSLocalizedString(@”Hello world”,@”
        Note for translator: this is a greeting”
  2. Enable the "base internationalization" option in Xcode: this is a feature to support the MVC pattern that automatically separates the textual content to be translated by the storyboard and Interface Builder files1.
    In the project navigator window, select the project and click on Info:
    At the bottom of the screen, tick the checkbox for "Base Internationalization":
  3. Add languages by clicking on the + sign near the checkbox (the first one will be considered the “base development language”)
  4. For each language, tick all the files that you plan to put through translation.
  5. If you already use Xcode 6, export all translatable content using the export function:
    1. Select the project from File Explorer
    2. Select Editor > Export For Localization
    3. All of your text content will be flushed into a .xliff file to be sent for translation
  6. If you use Xcode 5:
    1. Navigate using Finder to your project directory
    2. look for the subdirectories <language code>.lproj where the languages in which you plan to translate have been set (es, it.lproj, fr.lproj, etc.)
    3. The individual .strings files contained are to be sent for translation

2. Translate strings

Matecat is an open-source web-based tool allowing you to translate a variety of files, including iOS text files.
In this tutorial, we will use Matecat to achieve the desired result in just a few minutes.

  1. Go to http://matecat.com
  2. Choose your languages of interest
  3. Drag the files to the dedicated area and wait for them to upload
  4. At the end of uploads, click "Analyze"

If you are only interested in doing a fast and free test with an automatic translation

  1. For each target language you have chosen, click on "Translate" and then "Open" to enter the translation screen for a file
  2. Click on "Preview" to download the translated draft

If you want to assign the translation to a professional agency

You can contact us for a quote or make an order with Matecat at any time.
To get an instant quote, use the green button below:
Get an online quote
Or keep following the tutorial to order by yourself:
  1. For each target language, click on "Translate" and then "Show Prices" to show the price and delivery times. Then click on "Order"
  2. You will be redirected to Translated login screen, where you can register or sign in if you already have a username and a password
  3. Confirm the order for your translation project.
    You will receive the file via e-mail by the date shown on the page.

If you want to do it yourself

  1. For each target language, click on "Translate" to enter the translation screen for a file
  2. Correct all of the individual translations proposed by the system and download the final version to be reimported into your Xcode

3. Reimport translations in Xcode

Other options

The description in the AppStore should also be translated, otherwise your users will not be able to find the app in their search language. Include the descriptions (AppStore metadata) in a separate file2.

Keep the .strings files updated

When adding new strings to the code, putting the translation keys into the strings files can be a hassle. Apple provides the genstrings3 tool, which makes this task automatic: simply run from the terminal within the project folder:

find . -name \*.m | xargs genstrings -o en.lproj/

In this case, it is assumed that the source language is English.

All strings managed through NSLocalizedString will be automatically entered in a separate series of .strings files, the "string tables".

Every time you run genstrings, it completely overwrites the old files. This could be dangerous if some strings have been removed from the code (due to being commented on or replaced by other versions), as their respective translations in the pre-existing strings files would be lost.

Where this behaviour is not desired, it would be advisable to use a special python script, update_strings.py:

Forgotten your password?

Enter your e-mail or user name

* A username or e-mail address is required
* Username not found
Please contact us at info@translated.net
* The e-mail address associated with your profile is missing or is invalid. Password can not be sent.
Please contact us at info@translated.net
* An e-mail was sent to the e-mail address you entered in your profile.
If you did not receive our e-mail, please contact us at info@translated.net

3 Simple Ways to Count Words

If in doubt, estimate the word count as best you can and complete your order.
If the word count is different, we'll get in touch before starting.

1. Paste your text here

0 words

Note: You can attach the original document during the order process. We support over 100 file formats, delivering the translated file in the same file format and layout.

2. Microsoft Word™ word count

In recent versions the word count is indicated in the status bar at the bottom of the page. In previous versions, use the "Word count" function in the "Tools" menu.

3. Ask us for help

Use the contact form or call us .

If you're in a hurry to place your order, make a rough estimate of the word count and place your order: we'll get in touch before we start working if the word count is different.

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies. Learn more OK