iOS: How to use Localize to translate your iOS mobile application

This guide will walk you through the process of using Localize to translate your iOS mobile application.

You can also watch this video which shows the process in action.

What you'll learn

Prerequisites

  • You have a project set up in Localize
  • You have experience developing iOS mobile applications
  • You have Xcode installed
  • Your iOS application uses a Localizable.strings file for all app copy

Preparing your app for localization

There are several methods you can use to translate your iOS mobile application but for the easiest translation workflow we recommend using Localizable.strings files which are key-value pair files that Xcode supports natively for localization.

To give an overview of the localization process, Xcode can load resources stored in the Localizable.strings directory of your project for use in your mobile application. Within Localizable.strings you should find a file that contains all key-value pairs of strings used throughout your application. If you have hard-coded any copy into the template files directly you will need to apply best practices and abstract your strings into a Localizable.strings file.

When a user’s mobile device is changed to a different language, your mobile application will attempt to load resources for that language by looking in Localizable.strings for the proper language. For example, if your mobile device is set to French your application will attempt to load resources from Localizable.strings (French). In order to translate your application into a particular language you will need to create a new Localizable.strings file for each of the languages you would like to translate.

Using the Localize Dashboard to translate your app

Import your Localizable.strings file into Localize

  1. Within your Localize Dashboard go to the Phrases > File Import/Export page
  2. Select Import from the left submenu
  3. Select IOS STRINGS as your file type
  4. Your source language will automatically be selected as the only language option
  5. Select an import type of Phrases
  6. Upload and submit your Localizable.strings file

Translate your imported phrases

Using the Localize dashboard, you may translate your source language phrases into as many languages as you need. If you are unfamiliar with the translation workflow, please see our Basic Translation Workflow with Localize video.

Export your translations into new Localizable.strings files

  1. Within your Localize Dashboard go to the Phrases > File Import/Export page
  2. Select Export from the left submenu
  3. Select IOS STRINGS as your file type
  4. Select your desired phrase filtering options
  5. Select what language you want exported
  6. Select an export type of Phrases
  7. Click Export and your browser will download a copy of your new Localizable.strings file
  8. Repeat for each language you need in your mobile application
  9. Place a copy of each language file into the corresponding directory within Xcode and rename the file to Localizable.strings or simply update existing files with content from the new ones.

Test your translated mobile application

Now that your files are properly formatted and loaded into your mobile application, change the language of your simulator or live device to one of your newly installed languages and load up your application. You should see all content properly translated.

Add Localize to your build process

Localize REST API

You can integrate Localize into your build process by writing scripts that make RESTful HTTP requests using the Localize REST API for the import and export of localization files, as well as much more. Our route documentation provides examples of HTTP requests in cURL, Node, Ruby, JavaScript, and Python.

npm module

You may also use our npm module, @localize/node, a Node-based wrapper for Localize’s REST API.

Localize CLI

You can also use the Localize CLI which uses a simple push/pull paradigm to push content into Localize and then pull out the translations.
Read about the CLI