In today’s globalized digital economy, speaking the local language of customer is crucial for customer engagement and faster market adoption. SAP Translation Hub helps in doing so. SAP Translation Hub is one of the services available in SAP Cloud Platform. Read here for more information
Since SAP Cloud Platform SDK for iOS 2.0 release, a new translation capability has been added in Assistant tool (a native MacOS app)
In this blog i will be showing to you that how easily you can add translation to an existing Xcode project created in Assistant Tool and its very simple to get native iOS apps translated.
(below steps have been performed using XCode 9.1 and iOS SDK 2.0 PL02)
- Lets us setup Translation Hub account in Assistant Tool:
Here, you need to provide Base URL of Translation Hub.
2. In Assistant, click on drop-down icon against an existing Project, select “Add Translation” option
3. You should be able to see this screen, select Language(s) you want to add translation for in your Xcode project (these list of languages/options coming directly from Translation Hub)
I selected German (de) option, click on “Add” ,
Assistant is exporting some localizable strings from Xcode project into xliff file(s), these files are uploading to Translation Hub account for translation, these files are translated there, translation get send back to Assistant and then assistant will import translated files into Xcode project automatically.
you should see below project structure once import is successful,
Note: In case, you did select more than one language, project structure might look different.
5. Before launching app in simulator, change device/simulator language to German
(Settings > General > Language Region )
6. Run project
You can check translation project in translation Hub UI
Under Translations, you will see translated text, also, you might want to fine tune text in case you didn’t like what translation Hub did for .
at the moment, text for app icon is like below:
lets try adjusting its text, i am going to update CFBundleName from (PRODUCT_NAME) $ to Produkt under German language > Save Project
In Assistant, i am adding German translation again, this time i dont need to perform manually xliff import since file is already there in Xcode , hence import happened automatically.
lets run project again, now i can see that updated text has been reflected.
Check below resources for more information:
Thanks for reading.
Product Management, SAP Cloud Platform User Experience