Localizing Android Apps¶
Translate your app's resource files into the language of your choice through the SAP Translation Hub using the Translation Hub wizard.
You can access the wizard from Android Studio. You'll need to enable and configure the SAP Translation Hub service from the SAP Cloud Platform cockpit. See Getting Started in the SAP Translation Hub User Guide for more information.
This feature does not work properly if you are using an SAP Cloud Platform Trial Account.
Open your mobile app project in Android Studio.
Right-click on the Project window and select Translate resources with the SAP Translation Hub.
From the Translation Hub wizard, enter the following and select Next:
Account Name – (Optional) To save your settings for reuse, provide a name for this profile and select the Save Account Information check box.
This name is used to identify the profile in the Accounts List available from Accounts.
URL – The URL of the Translation Hub service. You can obtain this URL from the SAP Translation Hub service cockpit.
- Username and Password – The credentials of your SAP Cloud Platform account.
From the next screen, select the appropriate option to create a new SAP Translation Hub project or use an existing one.
From the final screen, do the following:
- Current Project – If you chose to use an existing project, select it from the list. For new projects, the wizard uses the name of your Android project for the new SAP Translation Hub project. This field is not editable.
- Select Android XML Files – Use the Browse button to navigate to the target XML file in your app's resource folder.
- Domain – Select an appropriate domain from the list. SAP Translation Hub uses the concept of domains to allow source text to be translated differently depending on the business context.
- Source Language – Select the language of the selected XML file.
- Target Language – Select one or more target languages for your translations.
Select Finish to upload the project details and start the translation.
When the translation is complete, translated XML files are added to your app's resource folder.