Short note: This article covers iOS SDK 8.1 developed in Xcode 6.1. Other versions should work fine, too.
Your Basic Setup
Localization in Xcode can be done easily with the Strings format. Before we dig any deeper you should check out the documentation on iOS with Phrase setup. With the XLIFF format you now have the possibility to group your
.strings files into larger XLIFF language files. For example, all your .strings for English will be put into a singleen.xliff file. No more cluttered .strings files in your project!
Sample XLIFF file:
Workflow![]()
The localization workflow itself is different to the usual Strings workflow:
Supports various formats including Android strings, Java properties, TMX, XLIFF and TS. Convert XLIFF language packs XLIFF is an XML format, short for 'Localization Interchange File Format'. For the Import, select the project name in Xcode and choose Editor Import Localizations. (Note that Xcode will create the translation for the target language in the project file for you. You do not have to do this in advance.) Now, the app is localized in the imported language. Not all Xliff editors have been created equally. We’ve custom built our own XML parser to read even the most complex Xliff v1.2 files. Xliff Editor effortlessly handles Segmentation, Inline tags and Alternate translations.Whats an XLIFF file? An xliff file is a standardized file format based on XML, used to represent localization data. I made one as well, and it is open sourced:) Xliffie is designed for developer, with functions like printf-formatted string checking (e.g. Make sure%@ is present, and not a%d in the translated string), search with regex, and integrated with Google / Bing translation. Apple talk about xcodebuild -importLocalizations in their pdf and video but it seems it's not supported yet in Xcode 6.1.1. – alexk7 Mar 6 '15 at 22:17 Mine crashes too. I made a sample project and can successfully round trip a pseudo localization, but it doesn't work with my real app.
Export your localization files by clicking on your project. Then
Editor > Export For Localization . Within this folder all your translations reside as a .xliff file. It is best to upload and download your files to and from Phrase from this folder. Import your localization files by clicking on your project. Then Editor > Import Localizations . Let’s say you exported your files from the Xcode project and uploaded some translations to Phrase. If you have new translations download them to your translation export folder. Then just import the translations back into your application by using Xcode’s import feature.
Explore why app translation can be key to your global business expansion and follow our best practices.
Check out the guide
Pluralization
Unfortunately XLIFF does not support pluralization. For that reason Xcode uses the Stringsdict format. If you want to pluralize your app you will need to work with the two formats simultaneously. You can still work with XLIFF as suggested before.
Additionally you will need to set up Phrase for the
.stringsdict files as well.
Uploading Your Translations To Phrase
Uploading your files to Phrase leaves you open with two options. The first one is via the translation center:
The second one is for your developers by using the command-line client.
If you want to upload a specific XLIFF file for example English (en) simply type
If you would like to download your translations for English simply type
Next Steps![]()
With a working Phrase setup your application is good to go. You can start the translation process by managing your keys in the translation center, ordering translations or by collaborating with your translators and developers.
Further Reading
Free tool converts Gettext PO files to .xlf XML files for Symfony i18n module.Language pack converter
Upload a language pack to convert between common formats
Convert Gettext PO files
PO and POT files are supported.
Convert Gettext MO files
Loco can read the binary format and decompile to PO files.
Convert XML language packs
Supports various formats including Android strings, Java properties, TMX, XLIFF and TS.
Xliff Editor 2 1 – Xcode Localization Made Easy TutorialConvert XLIFF language packs
XLIFF is an XML format, short for 'Localization Interchange File Format'.
Convert ResX language packs
Support for plain text resources in ResX files for .NET
Convert Yaml language packsXliff Editor 2 1 – Xcode Localization Made Easy Using
Structures for Symfony and Ruby on Rails are supported.
Convert JSON language packs
Generic structures and Chrome extensions are supported.
Convert Java properties
Java properties and XML formats are supported.
Convert iOS language packs
Supports Localizable.strings plus Apple property list and binary plist formats
Convert PHP language packsXliff Editor 2 1 – Xcode Localization Made Easy Download
Zend, Symfony and CodeIgniter language packs are supported.
Xliff Editor 2 1 – Xcode Localization Made Easy LearningHaving trouble?
We've been altered about this error. Please contact us if you need help
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |