Extracting & Localizing XIBs (IBTOOL)

Got a localization question?

Extracting & Localizing XIBs (IBTOOL)

If you installed the Command Line Utilities along with Xcode (by default, you did) then you can use IBTOOL to extract strings from your XIB files. The process is simple and very manual. It may be better to consider using a 3rd party tool to help you.

Extracting .string files from XIBs

Open Terminal and navigate to your Xcode project repo. To generate a strings file from a XIB, enter the following:

ibtool --generate-strings-file XIBName.strings en.lpoj/XIBName.xib

Repeat for each XIB that needs localizing.

Translating your files

The most important thing to remember here is file encodings and string endings. Make sure your localizer uses a good text editor and completes each line with the required quotation marks and semi-colon. You must also keep the file in its original format (usually UTF-8 or 16), or, if required, upgrade the file to UTF-16.

Reimporting strings to XIB files

Once you have received your strings from the translator, you will want to 1) create target language duplicates of your XIBs and 2) import strings back into those XIBs. This can be done with IBTOOL again:

Leave a Reply

Welcome

This Knowledge Base (KB) is brought to you by Applingua, the friendly app localization agency that knows its tap from its click.
It’s designed to help you find answers to all your localization questions. If you need help or would like to get a quote to localize your app feel free to get in touch!