Apple XIB

XIB and Xcode localization for Apple applications.

Translate what Xcode exports from your XIB files, storyboards, and strings, reuse earlier translations, check format specifiers, and give Xcode a translated file to import. Your Xcode project keeps the interface, the build, and the final check.

Translated with another tool? See how migration works

Xcode XLIFF, XIB, and storyboards: Professional and higher

Your source XLIFF en.xliff Lingobit Localizer Project SourceGerman New Order Neue Bestellung Customer: Kunde: Quantity: Menge: Each string, translated in the project You get en.xliff de\en.xliff fr\en.xliff ja\en.xliff A translated file for each language; Xcode imports them Your source XLIFF en.xliff Translate in Lingobit Project SourceGerman New Order Neue Bestellung Customer: Kunde: Quantity: Menge: You get en.xliff source de\en.xliff fr\en.xliff ja\en.xliff
Input
The XLIFF from Xcode's Export Localizations, or XIB, storyboard, and .strings files
Output
A translated XLIFF for Import Localizations, or de.lproj\Main.strings
Runtime
The app picks the .lproj folder by the user's languages
Preview
None: strings are translated in the table
On this page

Tutorial

Localize an Xcode project with Lingobit, step by step.

Four steps from Export Localizations to Import Localizations.

Your source XLF en.xliff Project DE FR JA LOC MyApp.loc Main.xibXIB New Order Customer: Localizable.stringsSTRINGS Order %@ has been saved. Report Format XLIFF 1.2 XLF Your source XLF en.xliff Project DE FR JA LOC MyApp.loc Main.xibXIB New Order Customer: Localizable.stringsSTRINGS Order %@ has been saved. Report Format XLIFF 1.2 XLF
  1. Your source XLF en.xliff Project DE FR JA LOC MyApp.loc Main.xibXIB New Order Customer: Localizable.stringsSTRINGS Order %@ has been saved. Report Format XLIFF 1.2 XLF Your source XLF en.xliff Project DE FR JA LOC MyApp.loc Main.xibXIB New Order Customer: Localizable.stringsSTRINGS Order %@ has been saved. Report Format XLIFF 1.2 XLF

Your files TMX XLIFF CSV Open file Ship today 100% Print preview Notify the customer. 95% Microsoft terms Cancel Folder Quantity only what matches the project Project Translation memory Ship today Noch heute versenden Notify the customer. Kunde benachrichtigen. Terminology Cancel Abbrechen Quantity Menge Your files TMX XLIFF CSV Open file Ship today100% Print preview Notify the customer.95% Microsoft terms CancelFolderQuantity only what matches the project Project Translation memory Ship today Noch heute versenden Notify the customer. Kunde benachrichtigen. Terminology Cancel→Abbrechen Quantity→Menge
ProjectDEFRJAMyApp.locMain.xibNew OrderLocalizable.strings PrepareTranslationTaskImportTranslationResults TranslatorDENew OrderNeue BestellungCustomer:Kunde:CreateErstellenSourceGermanNew OrderNeue BestellungCustomer:Kunde:Quantity:Menge:Validation on save Or their CAT toolXLIFF 1.2for the tool the translatoralready uses ProjectDEFRJAMyApp.locMain.xibNew OrderLocalizable.strings PrepareTranslation Task TranslatorDENew OrderNeue BestellungCustomer:Kunde:CreateErstellenSourceGermanNew OrderNeue BestellungCustomer:Kunde:Quantity:Menge:Validation on save Or their CAT toolXLIFF 1.2for the tool the translatoralready uses ImportResults
  1. Your files TMX XLIFF CSV Open file Ship today 100% Print preview Notify the customer. 95% Microsoft terms Cancel Folder Quantity only what matches the project Project Translation memory Ship today Noch heute versenden Notify the customer. Kunde benachrichtigen. Terminology Cancel Abbrechen Quantity Menge Your files TMX XLIFF CSV Open file Ship today100% Print preview Notify the customer.95% Microsoft terms CancelFolderQuantity only what matches the project Project Translation memory Ship today Noch heute versenden Notify the customer. Kunde benachrichtigen. Terminology Cancel→Abbrechen Quantity→Menge
  2. ProjectDEFRJAMyApp.locMain.xibNew OrderLocalizable.strings PrepareTranslationTaskImportTranslationResults TranslatorDENew OrderNeue BestellungCustomer:Kunde:CreateErstellenSourceGermanNew OrderNeue BestellungCustomer:Kunde:Quantity:Menge:Validation on save Or their CAT toolXLIFF 1.2for the tool the translatoralready uses ProjectDEFRJAMyApp.locMain.xibNew OrderLocalizable.strings PrepareTranslation Task TranslatorDENew OrderNeue BestellungCustomer:Kunde:CreateErstellenSourceGermanNew OrderNeue BestellungCustomer:Kunde:Quantity:Menge:Validation on save Or their CAT toolXLIFF 1.2for the tool the translatoralready uses ImportResults

Output · Validation Inconsistent format string Localizable.strings · export Fixed Resource Localizable.strings · export Source Export {0} pages to {1}. Export %d pages to %s. Export <b>all</b> pages. Export %1 pages to %2. German {0} Seiten nach {2} exportieren. %d Seiten nach %d exportieren. <b>Alle</i> Seiten exportieren. %1 Seiten nach %3 exportieren. {0} Seiten nach {1} exportieren. %d Seiten nach %s exportieren. <b>Alle</b> Seiten exportieren. %1 Seiten nach %2 exportieren. Output · Validation Inconsistent format string Localizable.strings · export Fixed Localizable.strings · export Source Export {0} pages to {1}. Export %d pages to %s. Export <b>all</b> pages. Export %1 pages to %2. German {0} Seiten nach {2} exportieren. %d Seiten nach %d exportieren. <b>Alle</i> Seiten exportieren. %1 Seiten nach %3 exportieren. {0} Seiten nach {1} exportieren. %d Seiten nach %s exportieren. <b>Alle</b> Seiten exportieren. %1 Seiten nach %2 exportieren.
  1. Output · Validation Inconsistent format string Localizable.strings · export Fixed Resource Localizable.strings · export Source Export {0} pages to {1}. Export %d pages to %s. Export <b>all</b> pages. Export %1 pages to %2. German {0} Seiten nach {2} exportieren. %d Seiten nach %d exportieren. <b>Alle</i> Seiten exportieren. %1 Seiten nach %3 exportieren. {0} Seiten nach {1} exportieren. %d Seiten nach %s exportieren. <b>Alle</b> Seiten exportieren. %1 Seiten nach %2 exportieren. Output · Validation Inconsistent format string Localizable.strings · export Fixed Localizable.strings · export Source Export {0} pages to {1}. Export %d pages to %s. Export <b>all</b> pages. Export %1 pages to %2. German {0} Seiten nach {2} exportieren. %d Seiten nach %d exportieren. <b>Alle</i> Seiten exportieren. %1 Seiten nach %3 exportieren. {0} Seiten nach {1} exportieren. %d Seiten nach %s exportieren. <b>Alle</b> Seiten exportieren. %1 Seiten nach %2 exportieren.

Project Open Öffnen Save Speichern Print Drucken Export Exportieren Removed Help Hilfe Scan for Changes New build Open Öffnen Save Speichern Print all Updated Help Hilfe Share New Project Öffnen Speichern Drucken Exportieren Hilfe Removed Scan for Changes New build Open Öffnen Save Speichern Print all Updated Help Hilfe Share New
  1. Project Open Öffnen Save Speichern Print Drucken Export Exportieren Removed Help Hilfe Scan for Changes New build Open Öffnen Save Speichern Print all Updated Help Hilfe Share New Project Öffnen Speichern Drucken Exportieren Hilfe Removed Scan for Changes New build Open Öffnen Save Speichern Print all Updated Help Hilfe Share New

Xcode exports, Lingobit translates, Xcode imports.

Export Localizations collects the text of your XIB files, storyboards, .strings files, and String Catalogs into one XLIFF file. Lingobit translates it and writes a translated XLIFF for each language. Import Localizations puts the translations into the .lproj folders of your project.

Your Xcode projectLingobit XcodeXLIFFen.xlifftranslate, checkDEde\en.xliffXcode Export LocalizationsLingobit translates the XLIFFImport Localizations Your Xcode project XcodeXLIFFen.xliffLingobittranslate, checkDEde\en.xliffXcode

Lingobit does

  • Translates every string of the export, grouped by its XIB, storyboard, or strings file, with Xcode's notes.
  • Reuses earlier translations and the translation memory.
  • Checks format specifiers such as %@ and %lld, empty and too long translations, and more.
  • Writes a translated XLIFF for each language, or translated .strings files.

Your Xcode project keeps

  • The interface in XIB files and storyboards, and Auto Layout.
  • Export Localizations and Import Localizations.
  • Loading the right language at runtime.
  • The final test in the running application.

Reference

At startup, the app picks the .lproj folder by the user's languages.

Import Localizations writes the German text into de.lproj. When the user's first language is German (Germany), the app looks for de-DE.lproj, then de.lproj, so one German folder serves every German-speaking country.

LanguagesGerman (Germany)de-DE The app looks forde-DE.lprojnot shippedde.lprojloaded Your application Neue BestellungKunde:Report Without a translation, the interface shows its Base text. LanguagesGerman (Germany)de-DE The app looks forde-DE.lprojnot shippedde.lprojloaded Neue BestellungKunde:Report Without a translation: the Base text.
  • A missing translation shows the Base text in XIB files and storyboards; it does not break the application.
  • A language you do not ship is skipped: the app takes the next language in the user's list, then the development language.

Choose the language.

On Apple platforms the user chooses the language, not the app: in the system settings, for all apps or for yours alone. To test a language without changing the system:

  1. Set App Language in the scheme options of your Xcode project.
  2. Or pass the language at launch with -AppleLanguages "(de)".
  3. Check each window in German, French, and Japanese, with the longest texts.
open -a MyApp --args -AppleLanguages "(de)"

What Lingobit reads from an Xcode project.

The Xcode export is the recommended input: it carries the text of every XIB file, storyboard, strings file, and String Catalog, with notes for translators. XIB and storyboard files can also be added directly, without the export.

Lingobit reads XLIFF 1.2, which Xcode writes. A unit with inline markup is left out and stays as it is; Output reports how many.

Apple inputs, how Lingobit uses them, and what it writes
InputIn LingobitLingobit writes
XLIFF from Export LocalizationsStrings grouped by their file; Xcode's note is the comment for translators; units marked translate="no" are not shownThe same XLIFF with translations and target-language, by default de\en.xliff; Xcode imports it
.strings filesEach key and its text, in UTF-8 or UTF-16de.lproj\Main.strings in UTF-8, without comments
.plist filesString values, in XML, binary, or text formatThe same file in de.lproj
.xib and .storyboard filesThe text of labels, buttons, fields, windows, and menus, keyed by the object ID; current files and the older Interface Builder 3 formatThe same file in de.lproj, such as de.lproj\Main.xib

Do and don't.

Do

  • Export Localizations again before every handoff, and run Scan for Changes.
  • Write comments for translators in Xcode: they arrive in Lingobit as notes.
  • Use numbered specifiers such as %1$@ when translators may need to change the order.
  • Use Auto Layout, so longer German text has room.

Don't

  • Build sentences in code from translated pieces.
  • Send Swift, Objective-C, or Xcode project files to translators.

Troubleshooting.

Symptoms, causes, and what to do
SymptomLikely causeWhat to do
The application stays in EnglishThe translations were not imported, German is not added to the project's localizations, or German is not in the user's languagesImport the XLIFF in Xcode, check Localizations in the project settings, and test with App Language
Some strings are missing in LingobitThey contain inline markup, which Lingobit leaves out, or they are marked not to translateSee the Output panel for the count; translate those strings in Xcode
The application fails with one languageA translation drops or changes a format specifier such as %@Run Validation: it reports specifiers that do not match the source
German text is cut offThere is no preview in Lingobit, so long text shows only in the running applicationSet a maximum length for the strings in Lingobit; Validation reports translations that exceed it. Check the windows with App Language

The samples.

Localizer installs two Apple samples with their projects.

  • Xcode export: en.xliff from an app with a storyboard, Localizable.strings, and InfoPlist.strings, in German and French. The project writes de.xliff and fr.xliff next to it for Import Localizations.
  • Apple Property List: .plist files in XML, binary, and text format, translated into .lproj folders.

More about Apple localization.

Base internationalization and localized strings

Xcode keeps the XIB layout in Base.lproj and stores translated text separately for each language. Developers keep control of the Interface Builder layout, translators work with text instead of project structure, and existing translations are reused when the UI changes.

Base.lproj/MainMenu.xib
de.lproj/MainMenu.strings
fr.lproj/MainMenu.strings
String Catalogs and compiled files

String Catalogs reach Lingobit through the XLIFF that Export Localizations writes; .xcstrings files themselves are not read. Compiled .nib files are not read either: translate the .xib and .storyboard files or the export.

Visual review stays in Xcode

Longer translations need more room in labels, buttons, menus, and windows. Lingobit does not preview Apple windows or views, so check for cropped text, overlapping controls, and buttons that became too small in the running application. Interface Builder layout, Auto Layout fixes, Swift or Objective-C code, and packaging the application bundle stay in Xcode.