Localizing Menus and Interfaces

Localize the menus and interfaces for an iOS application by selecting an XIB file to localize, and a language for localization.

  1. Select the Xcode Interface Builder (XIB) file you want to localize in the Project Explorer.
  2. Open the File Inspector by selecting View > Utilities > File Inspector. The File Inspector appears in a pane of the right of the Xcode window.
  3. In the Localization section of the File Inspector pane, click the + button at the bottom of the section.
    This step makes the XIB file localizable by moving it into a folder named en.lproj.
  4. Click the + button again.
    A menu appears with a list of languages.
  5. Select the language you want to use in localizing the XIB file.

    The Localization section of the File Inspector displays the languages to which the file has been localized (in the example, French and English).

    The file's icon in the Project Explorer has a disclosure arrow next to it. Click the arrow to reveal the contents of the file. The Project Explorer displays one copy of the XIB file for each language you have chosen.

  6. Double-click on each icon to open it in a new tab or new window.
  7. Make the required changes to the interface elements in the language-specific XIB file, and then save the file.
  8. Verify that the localized XIB files are added to the list of files copied into the application's bundle. If not:
    1. Click the project icon in the Project Explorer, and then click the Target icon.
    2. Select the Build Phases tab.
    3. Expand the Copy Bundle Resources section, and then click the + button.
    4. Select the additional XIB files from the <language>.lproj folders and click Add.