Localizing Apps

You can improve app sales by providing local translations of the text and labeled UI elements in your app. This process is called localization. There are two elements:

bullet_2c.tif A file called Localized.strings provides support for general text, including alert messages. Optionally, it also can manage labeled UI elements.

bullet_2c.tif You can create localized versions of nib files. The localized nib can include text labels and other text elements that are pre-translated. It also may need to include size adjustments to allow for the different width of text in each language.

Creating Localized.strings

If you want to support multiple languages, you must add a file called Localized.strings to your app. Follow these steps:

1. Right-click the Supporting Files group in the Project navigator.

2. Select New File….

3. Select iOSResource and Strings File, as shown in Figure 11.18.

4. Save the file as “Localizable.strings”. No other name will work.

5. Select the file, and open the Utilities pane at the right if it isn’t already open.

6. Select the File inspector in the Utilities pane, if it isn’t already visible.

7. Open the Localization sub-pane.

8. Click the “+” icon, and select English.

9. Click the “+” icon again, and add as many further languages as you want your app to support.

Using ...

Get iOS App Development Portable Genius now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.