sap translation hub

288
User Guide | PUBLIC 2022-01-29 SAP Translation Hub © 2021 SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN

Upload: others

Post on 05-Feb-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SAP Translation Hub

User Guide | PUBLIC2022-01-29

SAP Translation Hub

© 2

021 S

AP S

E or

an

SAP affi

liate

com

pany

. All r

ight

s re

serv

ed.

THE BEST RUN

Page 2: SAP Translation Hub

Content

1 What is SAP Translation Hub. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Commercialization and licensing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 What's New for SAP Translation Hub. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.1 Domains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134.2 Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154.3 Quality Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16

5 Initial Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.1 Enterprise Account information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2 Regions and Hosts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.3 Tutorials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.4 Setting Up Roles and Authorizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6 Scope of the Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236.1 Supported Languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.2 Language of UIs for SAP Translation Hub. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

7 Integrating the Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297.1 Integrating Your Own Language Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Prerequisites for Integrating Your Own Language Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Access UIs for Integrating Your Own Language Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Upload Language Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Create a Company MLTR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Prepare a Company MLTR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Activate a Company MLTR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Translate Texts with a Company MLTR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Update a Company MLTR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7.2 Integration Scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Use SAP Translation Hub in ABAP Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Use SAP Translation Hub in SAP Business ByDesign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Use SAP Translation Hub with SAP Business Technology Platform SDK for iOS Assistant . . . . . . . 46Use SAP Translation Hub in SAP Web IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46Use SAP Translation Hub Document Translation for learning materials with Enable Now. . . . . . . . 46Use SAP Translation Hub to provide multilingual test cases in SAP Focused Build Test Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

2 PUBLICSAP Translation Hub

Content

Page 3: SAP Translation Hub

Use SAP Translation Hub Document Translation with One Support Launchpad: Expert Chat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Use SAP Translation Hub Document Translation with One Support Launchpad: Customer Incidents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47Use SAP Translation Hub to translate descriptions of structure elements in Solution Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Use SAP Translation Hub as your machine translation provider in XTM. . . . . . . . . . . . . . . . . . . . 48Use SAP Translation Hub with SAP BTP for ABAP apps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

8 Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498.1 Building the Base URL of SAP Translation Hub. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518.2 domains Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528.3 languages Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548.4 Translation Project API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Getting Started with the Translation Project API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Changing the Language of Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58ABAP Translation Project Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58File Translation Project Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Git Translation Project Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

8.5 suggestions Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151suggestions Method: More Code Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

8.6 texttypes Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1608.7 translate Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162

translate Method: More Code Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169translate Method BCP: More Code Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178

8.8 Testing the API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1888.9 Document translation APIs with Machine Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898.10 Generating CSRF tokens for public APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

9 End-User Guide:Translation Workflow Scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1949.1 Access UI for Translation Workflow Scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959.2 ABAP Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Prerequisites for Translating ABAP Short Texts Using an RFC. . . . . . . . . . . . . . . . . . . . . . . . . . 197Create Translation Projects for ABAP Short Texts Using an RFC. . . . . . . . . . . . . . . . . . . . . . . . 206Translate ABAP Short Texts Using an RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Update Translations in ABAP Systems Using an RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

9.3 Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211Supported File Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211Create Translation Projects for Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214Translate Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Update and Download Translations in Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

9.4 Git Repositories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217Git Repository on SAP Business Technology Platform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

SAP Translation HubContent PUBLIC 3

Page 4: SAP Translation Hub

Git Repository Hosted By Your Enterprise. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

Git Repository Hosted on the Web. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

9.5 Managing Post-Editing and Review Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Configure Translation Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

Use a One-Step Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

Use a Two-Step Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

9.6 Working with Translation Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

10 Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

10.1 Document History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

10.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

10.3 Before You Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

10.4 Technical System Landscape. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

10.5 Security Aspects of Data, Data Flow, and Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

User Administration and Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

10.6 Authorizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

Role and Authorization Concept for SAP Business Technology Platform. . . . . . . . . . . . . . . . . . 262

Role and Authorization Concept for SAP HANA XS Back End. . . . . . . . . . . . . . . . . . . . . . . . . . 263

Role and Authorization Concept for Machine Translation Back End. . . . . . . . . . . . . . . . . . . . . . 264

Role and Authorization Concept for ABAP RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

10.7 Session Security Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

10.8 Network and Communication Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Communication Channel Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Network Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Communication Destinations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

10.9 Application-Specific Virus Scan Profile (ABAP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

10.10 Data Storage Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

SAP HANA Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

SAP Business Technology Platform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

Customer ABAP System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

Data Protection and Privacy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

10.11 Security for Additional Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

10.12 Dispensable Functions with Impacts on Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

10.13 Other Security-Relevant Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

10.14 Security-Relevant Logging and Tracing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

SAP Business Technology Platform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

10.15 Services for Security Lifecycle Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

11 Monitoring and Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

4 PUBLICSAP Translation Hub

Content

Page 5: SAP Translation Hub

1 What is SAP Translation Hub

Translate UI texts and documents and get suggestions for UI texts during development.

SAP Translation Hub lets you translate your UI texts of up to 3,000 characters in length by using a repository of SAP-approved translations and terminology as well as machine translation. You can access the translation resources by consuming a range of API methods or by using integrated workflow scenarios on a UI. Furthermore, developers can get suggestions for their source texts during the development phase, which improves accuracy and saves time. The integrated workflow scenarios let you manage the translation of texts from various development environments on a single UI. You can also use the UI for post-editing and review steps, and to transfer the translations to the source development environment. Additionally, SAP Document Translation allows you to translate HTML, office or XLIFF files through our APIs.

Business scenario

SAP Translation Hub is the go-to application if you want to translate business-specific texts of various types and want to

● Use SAP-trained machine translation engines.● Use an SAP-based multilingual text repository.● Operate your translation tasks in a secure environment.

Environment

This service runs in the Neo environment.

Features

Get suggestions for UI texts

Use a dedicated API method to get good quality suggestions for English texts when you develop applications.

Translate Git content Translate texts for applications that you manage in on-premise Git repositories, Web-based Git repositories, and the Git repository on SAP Business Technology Platform.

Translate iOS apps Use the integration with SAP Business Technology Platform SDK for iOS Assistant to translate app texts.

SAP Translation HubWhat is SAP Translation Hub PUBLIC 5

Page 6: SAP Translation Hub

Translate as part of workflow scenarios

Translate texts from multiple repositories and manage the subsequent post-editing and review steps on a single UI.

Use integration with SAP Web IDE

Get suggestions for UI texts and translate .properties files directly from your projects in SAP Web IDE.

Translate ABAP content Translate your ABAP extensions for your business scenario directly in SAP Translation Hub either directly in SE63 or with our workflow.

Translate documents Use the SAP Document Translation API to translate HTML files, office documents etc.

Overview Graphic

You can translate texts using a set of integrated translation workflow scenarios on a dedicated UI. You can also translate texts and get suggestions for source texts during the software development phase by consuming a set of API methods.

You can translate texts as part of translation workflow scenarios for different development environments. You can also translate texts and get suggestions for source texts during the software development phase by consuming a set of API methods.

SAP Translation Hub comprises the following translation providers:

● A database of multilingual texts from SAP applications. The multilingual texts are stored in an SAP HANA database called the multilingual text repository (SAP MLTR).

● SAP Machine Translation, which was trained on a large number of translations that were verified by SAP-certified language experts.

● Optional: if you upload your own language data to SAP Translation Hub, you can use your own repository of texts as a first-choice translation provider. This repository is called a company MLTR.

6 PUBLICSAP Translation Hub

What is SAP Translation Hub

Page 7: SAP Translation Hub

● NoteBoth source and target UI texts have a limit of 3,000 characters each in length.

Related Information

Initial Setup [page 18]Development [page 49]Translating Texts in SAP Business Technology Platform SDK for iOS AssistantEnd-User Guide:Translation Workflow Scenarios [page 194]Videos about SAP Translation HubSAP Translation Hub on YouTube

SAP Translation HubWhat is SAP Translation Hub PUBLIC 7

Page 8: SAP Translation Hub

2 Commercialization and licensing

SAP Translation Hub is available on the BTP. There are several commercial models available.

● Subscription model: You can order STH through the SAP Store .● Cloud Platform Enterprise Agreement (CPEA) model: You can use STH if you are using the CPEA model.

Follow this link to calculate your usage.● Pay as you go: You can use our service as part of the Pay-as-you-go model and you can order it through the

SAP Store .● Free tier: You can also consume the Document Translation service in a free tier model . To use this model,

you must choose the AWS Frankfurt option under Region/Provider.

You can find general information about the Business Technology Platform here.

NoteDefinition of the metric “character”:

The Usage Metric for the Cloud Service is blocks of 100,000 characters returned to Customer as translated text, including whitespace characters. Characters with multiple bytes are counted as a single character (e.g. zhCN).

TipYou can try out the Document Translation service using the free service plan in the Multi-Cloud and Cloud Foundry environments. The character limit is 500,000 characters per month.

8 PUBLICSAP Translation Hub

Commercialization and licensing

Page 9: SAP Translation Hub

3 What's New for SAP Translation Hub

Core Components, 2020

Tech­nical Com­po­nent

Capa­bility

Envi­ron­ment Title Description Action Type

Avail­able as of

SAP Trans­lation Hub

Exten­sion Suite - Digital Experi­ence

Cloud Foun­dry

Inte­gra­tion with XTM Cloud

We now offer an integration of SAP Translation Hub with XTM Cloud. Users can run their translation projects in XTM Cloud and use the SAP machine translation engine.

Info only

New 2021-12-07

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Cloud Foun­dry

Docu­ment Trans­lation serv­ice API

We now offer a free trial version of Document Translation service in the region US East (VA).

Info only

New 2021-11-10

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Cloud Foun­dry

Docu­ment Trans­lation serv­ice API

You can now encapsulate your Document Translation API re­quests in and receive responses in JSON. This is controlled by the values of content type and accept header. You can find more information here.

New 2021-10-27

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo New inte­gra­tion sce­nario for SAP Trans­lation Hub

The Support Log Assistant is now translated into various lan­guages using SAP Translation Hub. Customers and support colleagues can now use the UI of this tool in several lan­guages. You can find more information in this blog post .

New 2021-06-22

SAP Translation HubWhat's New for SAP Translation Hub PUBLIC 9

Page 10: SAP Translation Hub

Tech­nical Com­po­nent

Capa­bility

Envi­ron­ment Title Description Action Type

Avail­able as of

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Cloud Foun­dry

New inte­gra­tion sce­nario for Docu­ment Trans­lation serv­ice

SAP Ariba Connect: Fieldglass and Ariba KBAs are now trans­lated using Document Translation service.

New 2021-04-22

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now use the API methods to create ABAP and Git translation projects, execute the translation process, and view the details of translation projects.

See Translation Project API [page 56]

New 2020-02-12

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now refine the quality index further based on their occurrences within the repository and few other parameters. See translate Method [page 162]

New 2019-11-26

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now restrict translations output based on quality in­dex. This means that you can restrict outputs for which qual­ity index is below a given threshold value. This can be ach­ieved with the MinQuality field in the translation API. See translate Method [page 162]

New 2019-11-25

10 PUBLICSAP Translation Hub

What's New for SAP Translation Hub

Page 11: SAP Translation Hub

Tech­nical Com­po­nent

Capa­bility

Envi­ron­ment Title Description Action Type

Avail­able as of

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now use the simulation run in translate API by setting the new Statistics field called "statsOnly", to "True". The translations are not updated. However, only the metadata like, Translation Providers and Quality Index is displayed. Also the data provided is not considered for billing. See translate Method [page 162].

New 2019-09-27

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now use the Translation Project API to translate XLIFF (XLIFF) and SAP HANA text bundle (HDBTEXTBUNDLE) files.

See File Translation Project Methods [page 81]

New 2019-05-31

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo SAP Trans­lation API

You can now use an API to create and manage file translation projects.

See Translation Project API [page 56].

New 2019-01-18

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo Browser sup­port

In line with Microsoft’s road map for their browser portfolio, we have added Edge as a supported browser for SAP Transla­tion Hub.

Generally, we recommend the use of Google Chrome for best performance and results.

New 2020-09-10

SAP Translation HubWhat's New for SAP Translation Hub PUBLIC 11

Page 12: SAP Translation Hub

Tech­nical Com­po­nent

Capa­bility

Envi­ron­ment Title Description Action Type

Avail­able as of

SAP Trans­lation Hub

Exten­sion Suite - Devel­op­ment Effi-ciency

Neo UI 2.0 (Beta)

The new UI 2.0 has been released. See Access UI for Transla­tion Workflow Scenarios [page 195].

New 2020-09-14

12 PUBLICSAP Translation Hub

What's New for SAP Translation Hub

Page 13: SAP Translation Hub

4 Concepts

This section describes concepts that are used in SAP Translation Hub.

Related Information

Domains [page 13]Quality Index [page 16]

4.1 Domains

To cater for situations in which a source text must be translated differently depending on the business context, SAP Translation Hub uses a concept called domains.

NoteEven if you don't use domains or a similar concept in your development environment, you must specify a domain when you create translation projects as part of the translation workflow scenarios in SAP Translation Hub.

Background Information

In certain business contexts, industries, or applications, a given source text might need to be translated in a specific way. To determine which translation to use in a given context, some contextual information about the text is required. SAP Translation Hub gets basic context information about texts by using a domain that you specify in a translation project or in the translate API method.

The texts in the SAP multilingual text repository (SAP MLTR) are assigned two-character domains from their origins in SAP's translation and terminology processes.

ExampleOne of the English source texts that you want to translate is application. If there's no information about the business context in which the text is used, the translations that you get might not work in the specific context.

If the text is used in a human resources (HR) context, it is likely to mean job application. If the text is used in a technology component, however, it is likely to mean software application.

SAP Translation HubConcepts PUBLIC 13

Page 14: SAP Translation Hub

If you provide information about the context in the form of a domain, you improve the chance of getting the right translation.

Domains and Domain Groups

To make it easier to choose a domain in SAP Translation Hub, the two-character domains are consolidated in a list of domain groups.

The following domain groups are available:

Name of Domain Group ID of Domain GroupExamples of Business Context or Ap­plications

Analytics 06 Data analysis and business intelligence.

Financials 05 Financial accounting, controlling, and fi-nance management.

General 08 The remaining application areas.

Industries 09 SAP industry solutions, such as auto­motive, aerospace and defense, and in­surance.

Logistics 03 Logistics execution, materials manage­ment, and plant maintenance.

People Management 04 Human capital management (HCM), learning solutions.

Sales 02 Sales and distribution and customer re­lationship management (CRM).

Technology 07 SAP technology components, such as SAP NetWeaver.

TipTo see a complete list of domains, see domains API Method.

Use in SAP Translation Hub

When SAP Translation Hub looks for translations in the SAP MLTR, it uses the domain assignment to look for the most accurate translation in a given business context.

In SAP Translation Hub, you use domains and domain groups as follows:

● In the translation workflow scenarios, you choose a domain group.● In the translate API method, you can specify an individual, two-character domain or a domain group.

14 PUBLICSAP Translation Hub

Concepts

Page 15: SAP Translation Hub

Related Information

domains Method [page 52]

4.2 Glossary

A glossary of definitions for concepts used in SAP Translation Hub.

Company multilingual text reposi­tory (company MLTR)

A storage location for your own specific language data that you upload to SAP Transla­tion Hub. The repository runs on an SAP HANA database.

Domain A way to organizes translations according to a specific application or business context.

The assignment of texts to a domain helps to ensure that texts can be translated cor­rectly and consistently in applications that logically belong together from a terminology point of view. Providing the context information about the application or business con­text enables the same source text to be translated differently, depending on the busi­ness context or application in which the text is used.

ExampleOne of the English source texts that you want to translate is application. If there's no information about the business context in which the text is used, the transla­tions that you get might not work in the specific context.

If the text is used in a human resources (HR) context, it is likely to mean job appli­cation. If the text is used in a technology component, however, it is likely to mean software application.

If you provide information about the context in the form of a domain, you improve the chance of getting the right translation.

SAP multilingual text repository (SAP MLTR)

A storage location for translations provided by language specialists and official SAP ter­minology entries. The repository comprises a text in its original language and one or more translations for that text. The repository also includes the SAP translation domain and text type assigned to the text. The repository runs on an SAP HANA database.

Quality estimation (QE) A machine learning technique that predicts the quality of nonhuman translations, for example, machine translations. QE is a supervised machine learning technique that learns from the following:

● Good and bad examples of machine translations● The effort needed to make a machine translation comparable to a human transla­

tion

The statistical model that results from the machine learning technique can predict the quality of new translations by calculating a score. This score enables you to see which of the translations require the most or least effort to review.

SAP Translation HubConcepts PUBLIC 15

Page 16: SAP Translation Hub

SAP Machine Translation (SAP MT)

Software that translates text into another language automatically. SAP MT was trained on a large number of translations that were verified by SAP-certified language experts. SAP MT is specialized to translate SAP-related content and differs from open source MT systems in terms of better domain adaptation and terminology coverage.

Translation project An entity in SAP Translation Hub that you use to manage translations in the translation workflow scenarios that SAP Translation Hub supports. A translation project comprises metadata, such as the location of the texts that you want to translate and the required target languages.

4.3 Quality Index

To estimate the quality of translations, SAP Translation Hub uses a quality rating called the quality index. The higher the number on a scale of 0-100, the better the quality.

Background Information

SAP Translation Hub calculates the quality index for translations that are provided by the multilingual text repository (MLTR) and SAP Machine Translation (SAP MT). If you do not use SAP Translation Hub to translate some or all of the texts in a translation project, SAP Translation Hub does not calculate a quality index for these texts. This situation applies when you import existing translations into a translation project, such as translations from a .properties file in the Git repository of SAP Business Technology Platform or from an ABAP system.

Depending on the translation provider, SAP Translation Hub uses different methods to calculate the quality index.

Translation Provider: Company Multilingual Text Repository

If your company multilingual text repository (company MLTR) provides translations, the quality index is 99.

NoteIf a translation in the company MLTR is too long for a given field label, SAP Translation Hub truncates the text and sets the quality index to 1.

16 PUBLICSAP Translation Hub

Concepts

Page 17: SAP Translation Hub

Translation Provider: SAP Multilingual Text Repository

If the SAP multilingual text repository (SAP MLTR) provides translations, the quality index is based on the following:

Quality assessmentsWhen language specialists save the translations that are stored in the SAP MLTR, they assess the quality of translations by assigning a quality rating to each translation.

OccurrencesSAP Translation Hub analyzes the number of instances in which the combination of a source text and a particular translation occurs in the SAP MLTR. The more often a given combination of source text and translation occurs, the more confident we are that the translation is good.

Translation Provider: SAP Machine Translation

If SAP Machine Translation provides translations, the quality index is set to the constant value of 25%. The value indicates that we recommend that a human reviewer reviews the translations.

NoteIf the translations that SAP Machine Translation provides must be shortened due to length restrictions, which is especially relevant in ABAP translation projects, the value of the quality index is 1.

Related Information

Glossary [page 15]

SAP Translation HubConcepts PUBLIC 17

Page 18: SAP Translation Hub

5 Initial Setup

Learn how to sign up for an account on SAP Business Technology Platform and enable SAP Translation Hub.

1. Familiarize Yourself with the Concepts.

Before you use SAP Translation Hub, we recommend that you familiarize yourself with the basic concepts and supported languages. For more information, see Concepts [page 13].

2. Get An Account on SAP Business Technology Platform.

To be able to use SAP Translation Hub, you need an account on SAP Business Technology Platform. To try out the basic functions for nonproductive purposes, you can sign up for a trial account. For more information about the differences between the account types on SAP Business Technology Platform, see Enterprise Account information [page 19].

NoteThe subscriber account name should be less than 50 characters. In case you enter a name that is more than this limit, the system will pick only the first 50 characters.

To see how to sign up for the different account types, see the following:

● Getting Started with a Customer Account: Workflow in the Neo Environment

NoteIf your account was created for the multi-cloud environment, you will need to create a second subaccount for the Neo environment because the required SAP Translation Hub service is only available there.

If you have a productive account in the multi-cloud environment, follow these steps:

● Go to your global account: SAP BPT Cockpit.● Create a New Subaccount.● Define a name● In the Region field - choose SAP as the provider.● Choose a region, for example Europe (Frankfurt) neo-eu2.● Click on the Create button● Open the tile of the newly-created subaccount.

18 PUBLICSAP Translation Hub

Initial Setup

Page 19: SAP Translation Hub

3. Enable the SAP Translation Hub Service.

To be able to use the service, you enable it in the service catalog in the SAP Business Technology Platform cockpit. To see the steps, along with detailed screenshots, see the Enable the SAP Translation Hub servicetutorial. If you need to add more users to your account, see Setting Up Roles and Authorizations [page 21] for further information.

TipFor more information about services in the Neo environment, see Using Services in the Neo Environment.

4. Use SAP Translation Hub.

To get familiar with the main features of SAP Translation Hub as part of the integrated translation workflow scenarios, we recommend that you work through the step-by-step instructions in our tutorials and missions . For more information, see Setting Up Roles and Authorizations [page 21] .

If you want to work with the API directly, see SAP API Business Hub or use your favorite REST API client together with the API documentation (see Development [page 49]).

5. Further Support by SAP-Approved Partners.

While machine translations by SAP are continuously being improved, there is still a need to review the translations. Especially while using machine translation for large numbers of test cases, this might generate some additional effort. If you need further support to review translation proposals, you can contact SAP-approved partners (see general description of their services and a list of those partners ).

Related Information

Glossary [page 15]Regions and Hosts [page 20]End-User Guide:Translation Workflow Scenarios [page 194]Videos about SAP Translation Hub on YouTube

5.1 Enterprise Account information

SAP Translation HubInitial Setup PUBLIC 19

Page 20: SAP Translation Hub

Details Enterprise

Purpose Used for productive purposes.

Translation volume Translation volumes are agreed in your enterprise agree­ment.

NoteIn SAP Translation Hub, characters are used to measure translation volumes. Chararacters include spaces and multibyte characters. Multibyte characters are counted as one character.

Related Information

Feature Scope Description for SAP Translation HubSetting Up Roles and Authorizations [page 21]

5.2 Regions and Hosts

This section shows in which SAP Business Technology Platform regions SAP Translation Hub is available.

Global Account Type

Neo Region

(Operated by SAP) Host

Enterprise account Australia (Sydney) ap1.hana.ondemand.com

Europe (Rot) hana.ondemand.com

eu1.hana.ondemand.com

Europe (Amsterdam) eu3.hana.ondemand.com

Europe (Frankfurt) eu2.hana.ondemand.com

Japan (Tokyo) jp1.hana.ondemand.com

US East (Ashburn) us1.hana.ondemand.com

US East (Sterling) us3.hana.ondemand.com

Related Information

Regions and Hosts on SAP Business Technology Platform

20 PUBLICSAP Translation Hub

Initial Setup

Page 21: SAP Translation Hub

5.3 Tutorials

Follow a tutorial to get familiar with the features of SAP Translation Hub.

To learn about See

How to create an SAP Fiori app in SAP Web IDE and translate it using SAP Translation Hub

Create and translate an SAP Fiori app with SAP Translation Hub

How to translate an iOS app using SAP Translation Hub Localize an iOS app with SAP Translation Hub

How to set up Eclipse to develop a Java app and translate the app using SAP Translation Hub

Create and translate a Java app with SAP Translation Hub

Related Information

Tutorial Navigator

5.4 Setting Up Roles and Authorizations

An authorization process controls access to SAP Translation Hub.

To be able to consume the API methods and features of SAP Translation Hub, you set up authorizations for the users on SAP Business Technology Platform who are to access SAP Translation Hub.

Prerequisites

The users who need to access SAP Translation Hub have account logon information in SAP Business Technology Platform Identity Authentication service.

NoteIf you have an S user that you use to log on to platforms like SAP Jam, you can use the same user ID to register for a trial account on SAP Business Technology Platform. The resulting account name on SAP Business Technology Platform is <s user>trial.

SAP Translation HubInitial Setup PUBLIC 21

Page 22: SAP Translation Hub

Process

When you enable SAP Translation Hub in the SAP Business Technology Platform service catalog, the system automatically assigns your SAP Business Technology Platform user to the required role. No further assignments are required for your user.

If you want to enable other users to use the service, assign the required users to the User role as follows:

1. Choose the SAP Translation Hub tile in the SAP Business Technology Platform cockpit.2. Choose Configure Service.3. In the pane on the left, choose Roles.4. In the User section, choose Assign and enter the user ID of the required users, as shown in the following

screenshot:

NoteFor role assignments to take effect, close all browser sessions and open a new session or log out from the cockpit and log on again.

Related Information

SAP Business Technology Platform Identity Authentication Service

22 PUBLICSAP Translation Hub

Initial Setup

Page 23: SAP Translation Hub

6 Scope of the Service

6.1 Supported Languages

SAP Translation Hub supports a number of different languages. The translations are provided by the SAP multilingual text repository (MLTR) or SAP Machine Translation (SAP MT).

NoteYou can use all languages that SAP Translation Hub supports as source and target languages. Depending on the translation provider that SAP Translation Hub uses for a particular text, not all combinations of source and target languages return translations. For details, see the tables in the following sections.

Translation Provider: SAP Multilingual Text Repository

If the SAP MLTR is the translation provider, you can use all languages in the following table as a source and a target language. To get the latest list of languages, call the languages API method.

Language Name Language Code BCP Language Code

Arabic ar ar-SA

Bulgarian bg bg-BG

Catalan ca ca-ES

Chinese (Simplified) zh* zh-CN

Chinese (Traditional) zf* zh-TW

Croatian hr hr-HR

Czech cs cs-CZ

Danish da da-DK

Dutch nl nl-NL

English (Great Britain) 6n* en-GB

English (United States) en en-US

Estonian et et-EE

Finnish fi fi-FI

French (France) fr fr-FR

SAP Translation HubScope of the Service PUBLIC 23

Page 24: SAP Translation Hub

Language Name Language Code BCP Language Code

French (Canada) 3f* fr-CA

German de de-DE

Greek el el-GR

Hebrew he* he-IL

Hindi hi hi-IN

Hungarian hu hu-HU

Indonesian id id-ID

Italian it it-IT

Japanese ja ja-JP

Kazakh kk kk-KZ

Korean ko ko-KR

Latvian lv lv-LV

Lithuanian lt lt-LT

Malay ms ms-MY

Norwegian no nn-NO

Polish pl pl-PL

Portuguese (Brazil) pt pt-BR

Portuguese (Portugal) 1p* pt-PT

Romanian ro ro-RO

Russian ru ru-RU

Serbian sr sr-Cyrl-RS

Serbian (Latin) sh* sr-LATN-RS

Slovak sk sk-SK

Slovenian sl sl-SI

Spanish (Colombia) 0s* es-CO

Spanish (Spain) es es-ES

Swedish sv sv-SE

Thai th th-TH

Turkish tr tr-TR

Ukrainian uk uk-UA

Vietnamese vi vi-VN

* These language codes will be displayed in the BCP code (4-digit code) for some file types while these files are being printed, pushed or downloaded.

24 PUBLICSAP Translation Hub

Scope of the Service

Page 25: SAP Translation Hub

Translation Provider: SAP Machine Translation

If SAP Machine Translation (SAP MT) is the translation provider, the following pairs of source and target languages are supported. Quality index scores are provided for selected languages.

Source Language Name Source Language Code Target Language Name Target Language Code

Arabic ar English (United States) en

Bulgarian bg English (United States) en

Catalan ca English (United States) en

Czech cs English (United States) en

Chinese (Simplified) zh English (United States) en

Chinese (Traditional) zf English (United States) en

Croatian hr English (United States) en

Danish da English (United States) en

Dutch nl English (United States) en

English (United States) en Arabic ar

English (United States) en Bulgarian bg

English (United States) en Catalan ca

English (United States) en Chinese (Simplified) zh

English (United States) en Chinese (Traditional) zf

English (United States) en Croatian hr

English (United States) en Czech cs

English (United States) en Danish da

English (United States) en Dutch nl

English (United States) en Estonian et

English (United States) en Finnish fi

English (United States) en French (France) fr

English (United States) en German de

English (United States) en Greek el

English (United States) en Hebrew he

English (United States) en Hindi hi

English (United States) en Hungarian hu

English (United States) en Italian it

English (United States) en Japanese ja

English (United States) en Kazakh kk

English (United States) en Korean ko

English (United States) en Latvian lv

SAP Translation HubScope of the Service PUBLIC 25

Page 26: SAP Translation Hub

Source Language Name Source Language Code Target Language Name Target Language Code

English (United States) en Lithuanian lt

English (United States) en Indonesian id

English (United States) en Malay ms

English (United States) en Norwegian no

English (United States) en Polish pl

English (United States) en Portuguese (Brazil) pt

English (United States) en Romanian ro

English (United States) en Russian ru

English (United States) en Serbian (Latin) sh

English (United States) en Slovak sk

English (United States) en Slovenian sl

English (United States) en Spanish (Spain) es

English (United States) en Swedish sv

English (United States) en Thai th

English (United States) en Turkish tr

English (United States) en Ukrainian uk

English (United States) en Vietnamese vi

Estonian et English (United States) en

Finnish fi English (United States) en

French (France) fr English (United States) en

German de Bulgarian bg

German de Chinese (Simplified) zh

German de Croatian hr

German de Czech cs

German de English (United States) en

German de French (France) fr

German de Hungarian hu

German de Italian it

German de Polish pl

German de Romanian ro

German de Russian ru

German de Serbian (Latin) sh

German de Slovakian sk

German de Slovenian sl

26 PUBLICSAP Translation Hub

Scope of the Service

Page 27: SAP Translation Hub

Source Language Name Source Language Code Target Language Name Target Language Code

German de Spanish (Spain) es

Greek el English (United States) en

Hebrew he English (United States) en

Hindi hi English (United States) en

Hungarian hu English (United States) en

Italian it English (United States) en

Japanese ja English (United States) en

Kazakh kk English (United States) en

Korean ko English (United States) en

Lithuanian lt English (United States) en

Latvian lv English (United States) en

Malay ms English (United States) en

Norwegian no English (United States) en

Polish pl English (United States) en

Portuguese (Brazil) pt English (United States) en

Romanian ro English (United States) en

Russian ru English (United States) en

Spanish (Spain) es English (United States) en

Serbian (Latin) sh English (United States) en

Slovak sk English (United States) en

Slovenian sl English (United States) en

Swedish sv English (United States) en

Thai th English (United States) en

Turkish tr English (United States) en

Ukrainian uk English (United States) en

Vietnamese vi English (United States) en

Indonesian id English (United States) en

Related Information

languages Method [page 54]Quality Index [page 16]

SAP Translation HubScope of the Service PUBLIC 27

Page 28: SAP Translation Hub

6.2 Language of UIs for SAP Translation Hub

The SAP Translation Hub UIs are available in multiple languages.

The following list shows the available languages:

● Chinese● English● French● German● Japanese● Portuguese● Russian● Spanish

Specifying the Language of UIs

To change the language of the SAP Translation Hub UI for your translation projects, choose the required language in the settings menu; this you access by choosing the cog icon in the top right of the screen.

In some browsers, such as Google Chrome and Mozilla Firefox, the language of the SAP Translation Hub UI may be determined by your browser settings. In other browsers, such as Internet Explorer (prior to version 11), the language of the operating system determines the language of the UIs. From Internet Explorer 11, the language setting can be changed for SAP Translation Hub using the settings menu.

28 PUBLICSAP Translation Hub

Scope of the Service

Page 29: SAP Translation Hub

7 Integrating the Service

How to integrate SAP Translation Hub with different business scenarios.

There are various ways in which you can integrate SAP Translation Hub:

● You can integrate your own language data: Integrating Your Own Language Data [page 29].● You can use SAP Translation Hub in several software integration scenarios as described here: Integration

Scenarios [page 40].

7.1 Integrating Your Own Language Data

You can use your own specific translations and terminology to translate texts with SAP Translation Hub.

When you translate texts as part of the translation workflow scenarios and with the translate API method, SAP Translation Hub uses two translation providers: the SAP multilingual text repository (SAP MLTR) and SAP machine translation (SAP MT).

Since the translations that these translation providers propose can't always meet the specific requirements of your industry or company, you can integrate your own language data in the translation process. To use your own language data, you use a company MLTR, which serves as an additional translation provider.

To use your language data in SAP Translation Hub, the following steps are required:

● Upload Language Data [page 36]● Create a Company MLTR [page 37]● Access UIs for Integrating Your Own Language Data [page 36]● Prepare a Company MLTR [page 37]● Activate a Company MLTR [page 38]● Translate Texts with a Company MLTR [page 39]

The following video shows how to integrate your own language data from XLIFF files in SAP Translation Hub:

SAP Translation HubIntegrating the Service PUBLIC 29

Page 30: SAP Translation Hub

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Prerequisites for Integrating Your Own Language Data [page 30]Regions and Hosts [page 20]Upload Language Data [page 36]

7.1.1 Prerequisites for Integrating Your Own Language Data

This section contains the tasks that you must complete before you integrate your own language data in SAP Translation Hub.

Task More Information

Grant users the required authorization Authorization for Integration of Your Own Language Data [page 30]

Prepare XLIFF files that you want to upload to SAP Transla­tion Hub

Content and Attributes of XLIFF Files [page 32]

Prepare object lists in your source ABAP systems See Object lists for translation in the 1. ABAP Back-End Sys­tem section of Prerequisites for Translating ABAP Short Texts Using an RFC [page 197].

7.1.1.1 Authorization for Integration of Your Own Language Data

The use of your own language data in SAP Translation Hub is controlled by a dedicated authorization process.

The authorization concept is required in addition to the regular authorization that you need for the other parts of SAP Translation Hub.

Prerequisites

You have granted authorization to the users who need to use SAP Translation Hub. For more information, see Setting Up Roles and Authorizations [page 21].

30 PUBLICSAP Translation Hub

Integrating the Service

Page 31: SAP Translation Hub

Process

When you enable SAP Translation Hub in the SAP Business Technology Platform service catalog, the system automatically assigns your SAP Business Technology Platform user to the required role. No further assignments are required for your user.

If you want to enable other users to work with the functions specific to the integration of your own language data, assign the required users to the User role as follows:

1. Choose the SAP Translation Hub tile in the SAP Business Technology Platform cockpit.2. Choose Configure Service: Company MLTR Functions.3. In the pane on the left, choose Roles.4. In the User section, choose Assign and enter the user ID of the required users, as shown in the following

screenshot:

NoteFor role assignments to take effect, close all browser sessions and open a new session or log out from the cockpit and log on again.

SAP Translation HubIntegrating the Service PUBLIC 31

Page 32: SAP Translation Hub

7.1.1.2 Content and Attributes of XLIFF Files

To enable SAP Translation Hub to process XLIFF files for use in a company MLTR, the XLIFF files that you upload must meet certain prerequisites.

The following sections outline the individual prerequisites. To visualize the attributes and structure, see the sample XLIFF file.

File Attributes

● The structure of the XLIFF file must correspond to XLIFF version 1.2.● The source language of the texts in the XLIFF files must be English or German.● The translation unit keys must be identical in the files for all language pairs.● The set of XLIFF files that you upload must have the same source language. For example, English-French,

English-German, English-Spanish, German-French, German-Spanish.● Each XLIFF file must contain source and target language texts. It is not possible to upload XLIFF files that

contain only source tags or only target tags in translation units.● A translation unit key must be unique in the XLIFF files that you want to add to your company MLTR.● The metadata that you use in translation units for a given key must be identical in the files for all language

pairs.

NoteIf the keys in both files are identical, but the metadata is not identical in all translation units, it is not possible to activate the company MLTR.

Metadata

NoteFor examples of the metadata supported in an XLIFF file, see Sample XLIFF File.

Metadata on File Level

You enter the file-level metadata tags in SAP-specific metadata tags, which are embedded in the header tags.

Code Syntax

<header> <sxmd:metadata xmlns:sxmd="urn:x-sap:mlt:xliff12:metadata:1.0" xmlns="urn:x-sap:mlt:tsmetadata:1.0"> Enter the file-level metadata tags here. </sxmd:metadata> </header>

32 PUBLICSAP Translation Hub

Integrating the Service

Page 33: SAP Translation Hub

Name Tag Name Description

Object name object-name The technical name of the object from the development environment; the ob­ject name must comprise between one and 70 ASCII characters (character code 0x20 through 0x7e).

Collection collection An entity that groups translation ob­jects together that logically belong to­gether in SAP systems. In the ABAP de­velopment environment, a collection is the equivalent of a development pack­age.

Terminology domain domain The two-character domain in the SAP terminology database that best de­scribes the area in which the texts in the file are used. To get a list of the sup­ported text types, see domains Method.

Developer contact developer The name or ID of a contact person in development for questions about the texts in the XLIFF file.

Description description A description of the file; serves only in­formational purposes.

Origin origin The origin of the XLIFF file, for example, a properties file from which the XLIFF file was generated.

Metadata on Text (Translation Unit) Level

You add the attribute xmlns:sap="urn:x-sap:sls-mlt" to each translation unit tag.

Name Tag Name Description

ID id The ID of the translation unit.

Resource type restype The resource type, for example, caption or menu item.

Text type sap:sc The ID of a text type. To get a list of the supported text types, see Text Type Service.

Related Information

domains Method [page 52]Sample XLIFF File [page 35]Supported Language Codes [page 34]texttypes Method [page 160]

SAP Translation HubIntegrating the Service PUBLIC 33

Page 34: SAP Translation Hub

7.1.1.2.1 Supported Language Codes

The following table contains the language codes that your XLIFF files can contain.

Language Name Language Code

Arabic ar

Bulgarian bg

Catalan ca

Chinese zh

Chinese (Traditional) zh-TW

Croatian hr

Czech cs

Danish da

Dutch nl

English (Great Britain) en-GB

English en

Estonian et

Finnish fi

French fr

French (Canada) fr-CA

German de

Greek el

Hebrew he

Hindi hi

Hungarian hu

Indonesian id

Italian it

Japanese ja

Kazakh kk

Korean ko

Latvian lv

Lithuanian lt

Malay ms

Norwegian no

Persian - pilot language fa

Polish pl

34 PUBLICSAP Translation Hub

Integrating the Service

Page 35: SAP Translation Hub

Language Name Language Code

Portuguese (Brazil) pt

Portuguese pt-PT

Romanian ro

Russian ru

Serbian sr

Serbian (Latin) sh

Slovak sk

Slovenian sl

Spanish (Colombia) es-CO

Spanish es

Swedish sv

Thai th

Turkish tr

Ukrainian uk

Vietnamese vi

7.1.1.2.2 Sample XLIFF File

Shows an example of an XLIFF file that meets the requirements for use in a company MLTR.

Sample Code

<?xml version="1.0" encoding="UTF-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <file datatype="plaintext" original="self" source-language="en" target-language="de"> <header> <sxmd:metadata xmlns:sxmd="urn:x-sap:mlt:xliff12:metadata:1.0" xmlns="urn:x-sap:mlt:tsmetadata:1.0"> <object-name>tutorial1</object-name> <collection>SHOPS</collection> <domain>CA</domain> <developer>A180987</developer> <description>XLIFF file for shop app</description> </sxmd:metadata> </header> <body> <trans-unit id="hello_world" xmlns:sap="urn:x-sap:sls-mlt"> <source>Hello world!</source> <target>Hallo Welt!</target> </trans-unit> <trans-unit id="file_menu" xmlns:sap="urn:x-sap:sls-mlt" restype="caption"> <source>File</source> <target>Datei</target> </trans-unit> <trans-unit id="file_menu_new" xmlns:sap="urn:x-sap:sls-mlt" restype="menuitem">

SAP Translation HubIntegrating the Service PUBLIC 35

Page 36: SAP Translation Hub

<source>New</source> <target>Neu</target> </trans-unit> <trans-unit id="file_menu_exit" xmlns:sap="urn:x-sap:sls-mlt" sap:sc="XMIT"> <source>Exit</source> <target>Beenden</target> </trans-unit> </body> </file> </xliff>

7.1.2 Access UIs for Integrating Your Own Language Data

You use dedicated UIs to manage company MLTRs for your own language data.

You access the UIs as follows:

1. In the SAP Business Technology Platform cockpit, choose Services.2. Choose the SAP Translation Hub tile.3. Choose one of the following links:

○ Go to File Upload UI for Company MLTR○ Go to UI for Company MLTR

Related Information

Language of UIs for SAP Translation Hub [page 28]

7.1.3 Upload Language Data

If your own language data that you want to use in a company MLTR is stored in XLIFF files, you upload them to SAP Translation Hub.

See Content and Attributes of XLIFF Files [page 32].

1. In the service description for SAP Translation Hub, choose Go to File Upload UI for Company MLTR.2. Choose the plus sign in the bottom left of the UI.3. Add a description that you want to apply to all files that you upload at the same time. The description is just

for your reference so that it is easier to identify the purpose of the files.4. Select the files that you want to upload by using of the options described on the UI.

The combined total size of the files that you upload at the same time must not exceed 50MB.5. Choose Upload.

36 PUBLICSAP Translation Hub

Integrating the Service

Page 37: SAP Translation Hub

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Create a Company MLTR [page 37]

7.1.4 Create a Company MLTR

To use your own language data in the translation processes supported by SAP Translation Hub, you create a company MLTR. A company MLTR can use language data sourced either from uploaded XLIFF files or from object lists in ABAP systems.

You have prepared the data for use in a company MLTR (see Prerequisites for Integrating Your Own Language Data [page 30] ).

1. In the service description for SAP Translation Hub, choose Go to UI for Company MLTR.2. Choose the plus sign (+) in the bottom left of the screen.3. Create a company MLTR based on XLIFF files or on ABAP object lists.4. Enter a short text and description for the company MLTR.

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Prepare a Company MLTR [page 37]

7.1.5 Prepare a Company MLTR

To prepare a company MLTR for use in the translation processes supported by SAP Translation Hub, you link the company MLTR to the required reference data. A company MLTR can reference XLIFF files or an object list in an ABAP system.

You have created a company MLTR. For more information, see Create a Company MLTR [page 37].

1. Select the required company MLTR.2. Link the company MLTR with the required reference data, either:

○ Add or remove XLIFF files, ensuring that the company MLTR comprises at least one active XLIFF file.

○ Add or remove ABAP object lists.

Related Information

Access UIs for Integrating Your Own Language Data [page 36]

SAP Translation HubIntegrating the Service PUBLIC 37

Page 38: SAP Translation Hub

Activate a Company MLTR [page 38]

7.1.6 Activate a Company MLTR

To be able to use a company MLTR as a translation provider in SAP Translation Hub, you activate at least one company MLTR.

You have prepared the language data for the company MLTR, either by adding XLIFF files or referencing ABAP object lists. For more information, see Create a Company MLTR [page 37].

When you activate a company MLTR based on XLIFF files, SAP Translation Hub checks the version and content of the XLIFF files that you add to the company MLTR. If there are any errors in the XLIFF files, fix the errors locally.

NoteOnce you have started the activation process, you can't make any changes to a company MLTR until SAP Translation Hub has finished processing the company MLTR.

You can create and activate as many company MLTRs as you need. You determine which company MLTR you want to use for a particular translation by selecting the required company MLTR in your translation projects or in the translate API method.

After you have activated a company MLTR, you can use the language data in the company MLTR during the translation processes supported by SAP Translation Hub.

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Fix Errors in XLIFF Files [page 38]Translate Texts with a Company MLTR [page 39]

7.1.6.1 Fix Errors in XLIFF Files

If the XLIFF files that you add to a company MLTR do not meet all prerequisites for SAP Translation Hub, fix the errors locally before adding the files again.

1. Delete the XLIFF file in SAP Translation Hub.2. Fix the errors locally. For example, remove any duplicate keys or incorrect language codes in the XLIFF file.3. Upload the corrected XLIFF file to SAP Translation Hub.4. Add the corrected XLIFF file to the company MLTR and activate the company MLTR.

38 PUBLICSAP Translation Hub

Integrating the Service

Page 39: SAP Translation Hub

Related Information

Activate a Company MLTR [page 38]Content and Attributes of XLIFF Files [page 32]Create a Company MLTR [page 37]Upload Language Data [page 36]

7.1.7 Translate Texts with a Company MLTR

You can use your company multilingual text repository (company MLTR) as a translation provider in the translation workflow scenarios of SAP Translation Hub or when you consume the translate API method.

During the translation process, SAP Translation Hub first looks for suitable translations in the company MLTR before using the other translation providers in all cases except ABAP scenarios. Note that in ABAP scenarios, the system looks for translated texts in the ABAP systems, before reading from the company MLTR and other translation providers. For further information on ABAP scenario translations, refer Translate ABAP Short Texts Using an RFC [page 208].

Related Information

translate Method [page 162]End-User Guide:Translation Workflow Scenarios [page 194]

7.1.8 Update a Company MLTR

You can update the content of a company MLTR by adding or removing XLIFF files, or by adding or removing object lists in ABAP systems.

● You have uploaded any new or updated XLIFF files that you want to use (see Upload Language Data [page 36]).

● You have created a new object list or updated an existing object list in the ABAP back-end system (see Prerequisites for Integrating Your Own Language Data [page 30]).

1. Select the company MLTR that you want to update.2. Update the reference data for the company MLTR as follows:

○ Add or remove XLIFF files.○ Add or remove object lists in ABAP systems.

3. Reactivate the company MLTR.

SAP Translation HubIntegrating the Service PUBLIC 39

Page 40: SAP Translation Hub

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Activate a Company MLTR [page 38]Upload Language Data [page 36]

7.2 Integration Scenarios

You can use SAP Translation Hub to translate texts in a range of SAP products.

The following sections explain how you use SAP Translation Hub with the respective product.

● Use SAP Translation Hub in ABAP Systems [page 40]● Use SAP Translation Hub in SAP Business ByDesign [page 45]● Use SAP Translation Hub with SAP Business Technology Platform SDK for iOS Assistant [page 46]● Use SAP Translation Hub in SAP Web IDE [page 46]● Use SAP Translation Hub Document Translation for learning materials with Enable Now [page 46]● Use SAP Translation Hub to provide multilingual test cases in SAP Focused Build Test Steps [page 46]● Use SAP Translation Hub Document Translation with One Support Launchpad: Expert Chat [page 47]● Use SAP Translation Hub Document Translation with One Support Launchpad: Customer Incidents [page

47]● Use SAP Translation Hub to translate descriptions of structure elements in Solution Manager [page 47]● Use SAP Translation Hub as your machine translation provider in XTM [page 48]● Use SAP Translation Hub with SAP BTP for ABAP apps [page 48]

7.2.1 Use SAP Translation Hub in ABAP Systems

You can use SAP Translation Hub to translate texts in ABAP systems by using a report to call the SAP Translation Hub API.

The integration with SAP Translation Hub enables you to benefit from the translation capabilities of SAP Translation Hub while continuing to work in your existing ABAP translation environment.

For more information on further support to review translation proposals, see Further Support by SAP-Approved Partners in Initial Setup [page 18].

Also refer to this document: Using SAP Translation Hub to Translate Short Texts.

40 PUBLICSAP Translation Hub

Integrating the Service

Page 41: SAP Translation Hub

7.2.1.1 Prerequisites for Using SAP Translation Hub in ABAP Systems

To use SAP Translation Hub to translate short texts in ABAP systems, several prerequisites are required.

Complete the settings described in the following topics in sequence:

1. Prerequisites on SAP Business Technology Platform [page 41]2. Prerequisites in ABAP Systems [page 42]

7.2.1.1.1 Prerequisites on SAP Business Technology Platform

To use SAP Translation Hub to translate short texts in ABAP systems, you must have enabled the SAP Translation Hub service on SAP Business Technology Platform.

I already use SAP Translation Hub. Do I need to do anything?

Just have your user name and password for SAP Business Technology Platform and your base URL for SAP Translation Hub ready. You'll need to enter these details in your ABAP system.

RecommendationBefore you proceed with the steps in your ABAP system, log on to the SAP Business Technology Platform cockpit so that you have the required details readily available.

I don't even have an account on SAP Business Technology Platform. What do I need to do?

Depending on your use case, sign up for a trial account or an enterprise account. Once you have an account, enable the SAP Translation Hub service.

For details, see the first three steps in Initial Setup [page 18].

Related Information

Prerequisites in ABAP Systems [page 42]

SAP Translation HubIntegrating the Service PUBLIC 41

Page 42: SAP Translation Hub

7.2.1.1.2 Prerequisites in ABAP Systems

To use SAP Translation Hub to translate short texts in ABAP systems, several prerequisites are required in your ABAP system.

RecommendationTo ensure that you complete all required steps, work through the steps in the following sequence.

1. Check Unicode code page

Your system must be a Unicode system. If you don't know, use one of the following options to find out:

● Call transaction code SNLS.

● Choose System Status... SAP System Data .

2. Create an HTTP connection

To enable your ABAP system to call the SAP Translation Hub API, an HTTP connection to SAP Translation Hub is required.

1. Call the Configuration of RFC Connections (SM59) transaction.2. Create an HTTP connection with the following details:

General Settings

Field Entry

RFC Destination SAP_TRANSLATION_HUB

Connection Type HTTP Connection to External Server (G)

Description 1 (Optional) Connection to SAP Translation Hub

42 PUBLICSAP Translation Hub

Integrating the Service

Page 43: SAP Translation Hub

Technical Settings Tab

Group Box Field Entry More Information

Target System Settings Target Host <base URL after https:// up to .com>

Example○ Trial account:

saptranslation-p1941488054trial.hanatrial.ondemand.com

○ Enterprise ac­count: sapa7d7208ga-aa953e19a.hana.ondemand.com

Building the Base URL of SAP Translation Hub [page 51]

Port

NoteDepending on the ver­sion of SAP NetWeaver installed in your sys­tem, the name of this field might be Service No..

443 None.

Path Prefix /translationhub/api None.

Logon & Security Tab

Group Box Field Entry More Information

Logon with User Basic authentication Select Active. None.

User and Password Enter the user ID and pass­word for your SAP Business Technology Platform ac­count.

ExampleUser: p1941488054

You can see your user ID as­signed to the User role for the SAP Translation Hub service in the SAP Business Technology Platform cock­pit (see Setting Up Roles and Authorizations [page 21]).

Status of Secure Protocol SSL Select Active. None.

SSL Certificate Select ANONYM SSL Client (Anonymous).

None.

3. Save your entries.

SAP Translation HubIntegrating the Service PUBLIC 43

Page 44: SAP Translation Hub

RecommendationTo confirm that the connection works, test the connection.

3. Check whether a specific report exists in your ABAP system

To enable your ABAP system to call SAP Translation Hub, a report is required in your ABAP system.

If the Get Translations from MLTR Based on Object List (RS_LXE_MLTR_GET_TEXTS_FOR_OL) report does not exist in your system, implement SAP Note 2644105 .

4. Set up the translation environment

The Get Translations from MLTR Based on Object List (RS_LXE_MLTR_GET_TEXTS_FOR_OL) needs the translation environment to be set up. The setup includes the following steps:

● Assign object types to languages● Assign collections or packages to translation graphs● Define target languages

TipFor information about setting up the translation environment, see SAP Help Portal at https://help.sap.com/viewer/p/SAP_NETWEAVER.

Under SAP NetWeaver Platform, choose your version of SAP NetWeaver, for example, SAP NetWeaver 7.5, and search for setting up the translation environment.

5. Create an object list

The Get Translations from MLTR Based on Object List (RS_LXE_MLTR_GET_TEXTS_FOR_OL) translates texts based on an object list in the translation environment.

If you don't already have an object list, create an object list that contains the objects that you want to translate and then schedule the object list report.

TipFor information about object lists, see SAP Help Portal at https://help.sap.com/viewer/p/SAP_NETWEAVER.

Under SAP NetWeaver Platform, choose your version of SAP NetWeaver, for example, SAP NetWeaver 7.5, and search for creating object lists.

44 PUBLICSAP Translation Hub

Integrating the Service

Page 45: SAP Translation Hub

Related Information

Translate Short Texts Using SAP Translation Hub in ABAP Systems [page 45]

7.2.1.2 Translate Short Texts Using SAP Translation Hub in ABAP Systems

You use a dedicated report to translate short texts in your ABAP system using SAP Translation Hub.

You have made the settings described in Prerequisites for Using SAP Translation Hub in ABAP Systems [page 41].

When you run the report, it calls SAP Translation Hub to translate the short texts in ABAP objects using the translation providers in the following sequence:

1. Company multilingual text repository (company MLTR)2. SAP multilingual text repository (SAP MLTR)3. SAP Machine Translation (SAP MT)

If required, you can create translation proposals in the proposal pool based on the quality index of the translations that you get from SAP Translation Hub.

1. Call the Get Translations from MLTR Based on Object List (RS_LXE_MLTR_GET_TEXTS_FOR_OL) report.

2. Enter the required data in the fields on the selection screen.3. Run the report.

The texts contained in the object list are translated in accordance with the settings in your translation environment. If you specified the creation of translation proposals on the selection screen, translation proposals are created for translations that exceed the quality index that you entered on the selection screen.

For each target language, the report shows information about the objects and texts that were translated.

NoteTo find out more about the detailed process, refer to this document.

7.2.2 Use SAP Translation Hub in SAP Business ByDesign

The Customer Language Adaptation tool in SAP Business ByDesign enables you to translate Work Centers. You can use the integration with SAP Translation Hub to translate Work Center texts into the languages that SAP Translation Hub supports.

For more information, see Customer Language Adaptation Tool.

Further information can be found in this blog post: Automated translation with the Customer Language Adaptation tool .

SAP Translation HubIntegrating the Service PUBLIC 45

Page 46: SAP Translation Hub

7.2.3 Use SAP Translation Hub with SAP Business Technology Platform SDK for iOS Assistant

You can use SAP Translation Hub to translate applications that you create using the SDK for iOS Assistant.

For more information, see Defining an Application with the SAP Business Technology Platform SDK for iOS Assistant and search for Translation Hub.

7.2.4 Use SAP Translation Hub in SAP Web IDE

You can use SAP Translation Hub to translate i18n.properties files in your SAP Web IDE projects.

For more information, see Use SAP Translation Hub.

7.2.5 Use SAP Translation Hub Document Translation for learning materials with Enable Now

Integrate machine translation with SAP Translation Hub Document Translation for Enable Now content.

Learning content in multilingual organizations often poses a challenge because providing the material in various languages is both time consuming and costly. Additionally, certain regions may require learning content specifically designed for this region. Enable Now provides a solution for creating and publishing learning content. With the integration of SAP Translation Hub, you can provide multilingual content using the SAP machine translation solution.

Refer to this video to see how to set up the SAP Translation Hub integration with Enable Now: Integrating SAP Translation Hub with Enable Now

You can find further information in this blog post: Machine translation in Enable Now

7.2.6 Use SAP Translation Hub to provide multilingual test cases in SAP Focused Build Test Steps

Integrate SAP Translation Hub with SAP Solution Manager to create multilingual test cases with Focused Build Test Steps.

Focused Build Test Steps enable you to design and execute manual tests with SAP Solution Manager more easily and more quickly simplified and accelerated. However, providing these test cases in a multilingual environment can take a long time and be quite costly. With the integration of SAP Translation Hub, you can automatically provide test cases in different target languages. Simply connect to the SAP Translation Hub API on SAP Business Technology Platform.

Watch the video to see how the integration works in the system:Automated Translation of Test Cases for SAP Focused Build Test Steps .

46 PUBLICSAP Translation Hub

Integrating the Service

Page 47: SAP Translation Hub

You can find further information in this blog post:Automated Translation of Test Cases with Focused Build Test Steps .

7.2.7 Use SAP Translation Hub Document Translation with One Support Launchpad: Expert Chat

One Support Launchpad: Expert Chat with integrated machine translation.

You can now translate the expert chats in the One Support Launchpad automatically into several languages. This feature is directly integrated into the support environment.

You can find more information in this blog:Machine Translation for Expert Chat Conversations .

7.2.8 Use SAP Translation Hub Document Translation with One Support Launchpad: Customer Incidents

One Support Launchpad: Customer Incidents with integrated machine translation

You can now translate the most recent communication you have received from your SAP customer expert support directly in the incident window.

You can find out more information in this blog post: Machine Translation integration to Latest Communication from SAP Support for customer incidents .

7.2.9 Use SAP Translation Hub to translate descriptions of structure elements in Solution Manager

You can use SAP Translation Hub machine translation to automatically translate the descriptions of structure elements in Solution Manager.

RestrictionYou can only use this functionality if you have an SAP Translation Hub license. If you don't have a license, you can acquire it in the SAP store .

This SAP Note explains how to integrate the service 2902416 .

SAP Translation HubIntegrating the Service PUBLIC 47

Page 48: SAP Translation Hub

7.2.10 Use SAP Translation Hub as your machine translation provider in XTM

Integrate SAP Translation Hub with XTM to get machine translation proposals from Document Translation service.

If you use XTM Cloud for your translation scenarios, you can now select SAP Translation Hub as the machine translation provider to use proposals from Document Translation service. A prerequisite is to have a valid SAP Translation Hub license. This integration allows you to get proposals from the machine translation engine of SAP and use them in your XTM Cloud translation projects and workflows.

You can test the Document Translation service free-of-charge using the SAP Business Technology Platform. Besides, if you want to explore the end-to-end workflow, you can also test XTM for free for 30 days.

You can find more information about XTM here: https://xtm.cloud/

Watch these videos to see how to setup SAP Translation Hub as your machine translation provider in XTM.

● If you are using the SAP BTP Free Tier account: XTM integration for SAP Translation Hub with an SAP BTP Free Tier account

● And if you are using the SAP BTP Trial account: XTM integration for SAP Translation Hub with an SAP BTP Trial account

You can find further information in these blog posts: https://blogs.sap.com/2021/12/06/newest-integration-scenario-of-sap-translation-hub/ and https://xtm.cloud/blog/xtm-and-sap-the-future-is-now/ .

7.2.11 Use SAP Translation Hub with SAP BTP for ABAP apps

You can use SAP Translation Hub with SAP BTP Maintain Translations app to translate RAP-based apps.

You can find more information here: Maintain Translations. You can also watch this video for more information: Translation of SAP BTP ABAP apps with SAP Translation Hub.

48 PUBLICSAP Translation Hub

Integrating the Service

Page 49: SAP Translation Hub

8 Development

SAP Translation Hub comprises a set of API methods that applications can consume to translate texts using a multilingual text repository (MLTR) and machine translation.

You can use the API methods to translate texts, for example, from an app that you develop or enhance, or through a translation tool that you create in an integrated development environment (IDE). This section explains how to consume the SAP Translation Hub API on SAP Business Technology Platform.

The following API methods are available:

● domains● languages● Translation project● suggestions● texttypes● translate

Access

You access the API methods through the HTTPS protocol. Standard functions of SAP Business Technology Platform Identity Authentication service manage user authorizations for the API method. When you consume the API methods, you use basic authentication (user and password).

To be able to consume the SAP Translation Hub API methods, work through the following items:

1. Have you got a license on SAP Business Technology Platform?If you have, proceed to the next step. If you don't, no worries. It takes just a moment to request a free developer license at https://account.hanatrial.ondemand.com/.

NoteIf you have an S user that you use to log on to platforms like SAP Jam, you can use the same user ID to register for a trial account on SAP Business Technology Platform. The resulting account name on SAP Business Technology Platform is <s user>trial.

2. If you've heard about SAP Translation Hub before, maybe you've already enabled the SAP Translation Hub service for your account? If you have, you're good to go. If you haven't, complete the next couple of steps:1. In the SAP Business Technology Platform cockpit, choose Services in the navigation tree.

2. Choose SAP Translation Hub Enable .For more information about enabling services, see Using Services in the Neo Environment.

NoteYou don't need to configure any destinations.

3. If several people need to access the SAP Translation Hub API, assign the user IDs of those users.

SAP Translation HubDevelopment PUBLIC 49

Page 50: SAP Translation Hub

For more information about role assignments, see User Authentication and Authorization.

URL of API

To access the API, you need the base URL of SAP Translation Hub plus the API method and API-specific parameters. For information about the base URL, see Building Base URL of SAP Translation Hub.

Parameters

To filter or modify the response, the API methods that don't have a body for the payload use query parameters that are located in the query part of the URL.

Example<base URL>/v1/languages?search=<query_parameters>

Content

The API uses JSON as the content of the HTTPS request or response. All of the API responses that contain JSON have the JSON content type application/json; charset=utf-8.

Error Handling

Error Codes

Error Description

400 Bad Request

Content-Length: 0

This error occurs if not all of the required query parameters are specified or an invalid value type is sent in the request.

404 Not Found

Content-Length: 0

This error occurs if the wrong URL is used to call an API.

Related Information

SAP API Business HubBuilding the Base URL of SAP Translation Hub [page 51]

50 PUBLICSAP Translation Hub

Development

Page 51: SAP Translation Hub

domains Method [page 52]languages Method [page 54]suggestions Method [page 151]texttypes Method [page 160]translate Method [page 162]Testing the API [page 188]Translation Project API [page 56]Monitoring and Troubleshooting [page 286]Setting Up Roles and Authorizations [page 21]Using Services in the Neo EnvironmentGenerating CSRF tokens for public APIs [page 192]

8.1 Building the Base URL of SAP Translation Hub

The base URL is the main part of the URL that you use to access the SAP Translation Hub API.

You use the base URL with additional parameters that are specific to the individual API methods.

The following table summarizes the parts of the base URL:

Global Account Base URL Sample Base URL

Enterprise https://sap<technical name of provider subaccount>-<technical name of subscription subaccount>.<region host>/translationhub/api

https://saps1cbb8a9f-nchxp8kafw.eu3.hana.ondemand.com/translationhub/api

TipTo get your base URL, open the SAP BTP destination menu in your SAP BTP subaccount where SAP Translation Hub is enabled. You will find a destination with the name PUBLIC_API_SSO with a URL. This is the beginning of the SAP Translation Hub base URL. This is an example URL: https://saps1cbb8a9f-nchxp8kafw.eu3.hana.ondemand.com/translationhub. You now need to add /api at the end of this URL. The base URL derived from this example is: https://saps1cbb8a9f-nchxp8kafw.eu3.hana.ondemand.com/translationhub/API.

NoteFor details about the API methods and the query parameters that you add to the base URL, see the documentation for the individual API methods.

SAP Translation HubDevelopment PUBLIC 51

Page 52: SAP Translation Hub

Related Information

domains Method [page 52]languages Method [page 54]suggestions Method [page 151]texttypes Method [page 160]translate Method [page 162]Regions and HostsSAP Business Technology Platform Cockpit

8.2 domains Method

This method enables you to view the domains that are available in SAP Translation Hub.

Usage

SAP product terminology and translations are organized by domains. Domains are used to determine the correct translation for a given text in a specific application or business context.

TipAre you new to the concept of domains in the context of translation with SAP software? For an explanation and some examples, check out Domains.

The domains method returns a list of the domains and domain groups that are available in SAP Translation Hub. You can combine the domains method with the translate method to more accurately reflect the subject area of your texts.

Request

Access

URL <base URL>/v1/domains

HTTP method GET

Authorization Basic authentication (user and password for SAP Business Technology Platform)

Request Parameters

52 PUBLICSAP Translation Hub

Development

Page 53: SAP Translation Hub

To check whether a specific domain or domain group is available, you can add the following parameters to the URL:

Parameter Description Type

search Enables you to see whether a particular domain is available in SAP Translation Hub. For example: <base URL>/v1/domains?search=<domain_name>

NoteYou can enter all or part of the name of a domain or do­main group, for example, account.

Optional

onlyGroups Enables you to see a list of the domain groups that SAP Translation Hub supports. To list the domain groups, enter true as the value for this parameter.

TipYou can use the ID of a domain or a domain group to specify a particular subject area in the translate method.

Optional

Request Body Example<base URL>/v1/domains?search=financial

Response

The result is a JSON object that contains the following key-value pairs:

Key Description Part of Response?

id The ID of a domain or a domain group, depending on whether you use the onlyGroups parameter in the request.

Always in response

name The short description of a domain or domain group, depend­ing on whether you use the onlyGroups parameter in the re­quest.

Always in response

Response Body Example

Sample Code

{ "domains":[ { "id":"FI", "name":"Financial Accounting" }, { "id":"FS", "name":"Financial Services" },

SAP Translation HubDevelopment PUBLIC 53

Page 54: SAP Translation Hub

{ "id":"FB", "name":"Financials Basis" }, { "id":"FN", "name":"Financials" }, { "id":"1F", "name":"Business ByDesign Financial Accounting" }, { "id":"FB", "name":"Financials Basis" } ] }

Related Information

Building the Base URL of SAP Translation Hub [page 51]Domains [page 13]

8.3 languages Method

This method enables you to view the languages that SAP Translation Hub supports.

Usage

Returns a list of the languages that are available as target languages in SAP Translation Hub.

Request

Access

URL <base URL>/v1/languages

HTTP method GET

Authorization Basic authentication (user and password for SAP Business Technology Platform)

Request Parameters

54 PUBLICSAP Translation Hub

Development

Page 55: SAP Translation Hub

To check whether a specific language is available, you can add the following parameter to the URL:

Parameter Description Type

search Enables you to see whether a specific language is available in SAP Translation Hub. For example: <base URL>/v1/languages?search=<language_name>

NoteYou enter the name of a language, for example, Chinese, not the code for Chinese.

Optional

Request Body Example

<base URL>/v1/languages?search=Bulgarian

Response

The result is a JSON object, and contains the following key-value pairs:

Key Description Part of Response?

id The language code. Always in response

name The name of the language. Always in response

bcpcode The ISO code of the language, compliant with Best Current Practice (BCP) 47.

Always in response

Response Body Example

Sample Code

{ "languages": [ { "id": "bg", "name": "Bulgarian", "bcpcode": "bg-BG" } ] }

Related Information

Building the Base URL of SAP Translation Hub [page 51]Testing the API [page 188]

SAP Translation HubDevelopment PUBLIC 55

Page 56: SAP Translation Hub

8.4 Translation Project API

You can use a set of API methods to create and manage translation projects for the file scenario that SAP Translation Hub supports.

The Big Picture

If you just want to get a glimpse of what you can do without getting caught up in the details, get started by trying out the API with some basic examples in Getting Started with the Translation Project API [page 56].

The Details

If you want a complete list of the methods and parameters supported for each type of translation project, see the following:

● ABAP Translation Project Methods [page 58]● File Translation Project Methods [page 81]● Git Translation Project Methods [page 111]

8.4.1 Getting Started with the Translation Project API

If you want to get started by trying out the API with some basic examples, start with the sample code and examples in the following sections on this page.

To call the API, you need your user and password for SAP Business Technology Platform and the base URL plus a method that is specific to a given API. To see how to build the base URL for your type of global account, see Building the Base URL of SAP Translation Hub [page 51]. The methods required for each API are listed in the following sections.

NoteWhen you create a translation project using the Translation Project API, you cannot view or edit these translation projects on the SAP Translation Hub UI.

File Translation Projects

To translate texts in a file, such as a .properties file, the minimum number of API calls required is as follows:

1. Create a translation project (fileProjects).

56 PUBLICSAP Translation Hub

Development

Page 57: SAP Translation Hub

2. Upload the file (fileProjects/<translation project ID>/files).3. Translate the texts (fileProjects/<translation project ID>/executions).4. Get the translations (fileProjects/<translation project ID>/translations?language=de) or

(fileProjects/<translation project ID>/translations?language=de-DE).

To create a file translation project, use the URL<base URL>/v2/fileProjects with the POST method and the following sample code as the request payload:

Sample Code

{ "name": "File for sales app", "sourceLanguage": "en", "targetLanguages": [ "de" ] }

Sample Code

{ "name": "File for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE" ] }

To upload the .properties file, use the URL<base URL>/v2/fileProjects/<translation project ID>/files with the POST method. In the body, use the form-data body type and the file key Depending on your REST client, you might need to specify the attribute of this key as file.

To translate the texts in the file, use the URL<base URL>/v2/fileProjects/<translation project ID>/executions with the POST method. Use the following sample code as the request payload:

Sample Code

{ "operation": "PULL_TRANSLATE" }

Get the translations using the URL <base URL>/v2/fileProjects/<translation project ID>/translations?language=de or ?language=de-DE with the GET method.

These examples provide an insight into what you can do. For information about the additional endpoints and parameters that you can use, see File Translation Project Methods [page 81]

Related Information

Building the Base URL of SAP Translation Hub [page 51]Changing the Language of Messages [page 58]

SAP Translation HubDevelopment PUBLIC 57

Page 58: SAP Translation Hub

File Translation Project Methods [page 81]

8.4.2 Changing the Language of Messages

You can view API messages in the languages in which the SAP Translation Hub UIs are available.

By default, all messages are output in English. If you would like to output the messages in one of the supported languages, add the Accept-Language key to the header of the API call.

TipThe header is where you define the content type (Content-Type) of the API call, which is application/json; charset=utf-8 for the SAP Translation Hub APIs.

The corresponding value for the key is the HTTP code of the required language. The following table shows the available languages and the corresponding codes:

Language Language Code

Chinese zh

French fr-fr

German de-de

Japanese ja

Portuguese pt-br

Russian ru

Spanish es-es

ExampleYou want to see the messages in French. In the header section of your API call - or in a REST service client for testing purposes - enter a new key called Accept-Language. For the value of this key, enter fr-fr.

8.4.3 ABAP Translation Project Methods

You can use the methods to create ABAP translation projects, execute the translation process, and view the details of translation projects.

Getting Started

If you've come to this page from a search, it might look a bit overwhelming. If that's the case, we recommend that you first look at Translation Project API [page 56] to go through some straightforward uses cases and examples for the API.

58 PUBLICSAP Translation Hub

Development

Page 59: SAP Translation Hub

Access and Authorization

To call the API, you need your user and password for SAP Business Technology Platform. You also need to generate a CSRF-token:

X-CSRF-Token <Token>. Refer to Generating CSRF tokens for public APIs [page 192] for details.

The URL required to call the API comprises the base URL and a method. The details of the URL and method are listed under Access in the following sections.

Prerequisites

To translate texts in ABAP system, you must have made the settings described in Prerequisites for Translating ABAP Short Texts Using an RFC [page 197].

Create an ABAP Translation Project

Access

URL <base URL>/v2/abapProjects

HTTP method POST

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

name The name for the translation project, for example, ABAP texts for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

SAP Translation HubDevelopment PUBLIC 59

Page 60: SAP Translation Hub

Key Description Type

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

objectList The ID of the object list that you want to translate in the ABAP system.

Required

destination The three-character ABAP system ID and client in which you created the object list that you want to translate.

ExampleA8T_000

Required

60 PUBLICSAP Translation Hub

Development

Page 61: SAP Translation Hub

Request Body Example

{ "name": "Texts for sales department demo", "sourceLanguage": "en", "targetLanguages": [ "de", "es", "fr", "it" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "objectList": "4012", "destination": "A8T_000" }

{ "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "es-ES", "fr-FR", "it-IT" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "objectList": "4012", "destination": "A8T_000" }

Response

The translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, ABAP texts for sales demo.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

SAP Translation HubDevelopment PUBLIC 61

Page 62: SAP Translation Hub

Key Description Part of Response?

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

objectList The ID of the object list that you want to translate in the ABAP system.

Always in response

destination The three-character ABAP system ID and client in which you created the object list that you want to translate.

ExampleA8T_000

Always in response

Response Body Example

Sample Code

{ "id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en", "targetLanguages": [ "de", "es", "fr", "it"

62 PUBLICSAP Translation Hub

Development

Page 63: SAP Translation Hub

], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000" }

Sample Code

{ "id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "es-ES", "fr-FR", "it-IT" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000" }

Errors

If you specified an incorrect object list at project creation, the following error message will be displayed:

Sample Code

{ "error": { "code": 1117, "message": "We can\u2019t retrieve the object list [{0}]” }}

Get Details of ABAP Translation Projects

Access

URL <base URL>/v2/abapProjects/<translation project ID>

HTTP method GET

SAP Translation HubDevelopment PUBLIC 63

Page 64: SAP Translation Hub

RequestTo get the details of a single translation project, call the API with the ID of the translation project at the end of the URL.

To get the details of all translation projects that were created in a specific subaccount, call the API without the ID of the translation project. If you call the API for all translation projects, the response comprises an array of the individual translation projects.

Request Example

● Single translation project: <base URL>/v2/abapProjects/1201● All translation projects: <base URL>/v2/abapProjects

ResponseThe translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, ABAP texts for sales demo.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

64 PUBLICSAP Translation Hub

Development

Page 65: SAP Translation Hub

Key Description Part of Response?

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

objectList The ID of the object list that you want to translate in the ABAP system.

Always in response

destination The three-character ABAP system ID and client in which you created the object list that you want to translate.

ExampleA8T_000

Always in response

Response Body Example

Single Translation Project

Sample Code

{ "id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de", "es", "fr", "it" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000" }

Sample Code

{

SAP Translation HubDevelopment PUBLIC 65

Page 66: SAP Translation Hub

"id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "es-ES", "fr-FR", "it-IT" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000" }

All Translation Projects

Sample Code

{ "id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en", "targetLanguages": [ "de", "es", "fr", "it" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000"}, { "id": 1198, "name": "Texts for partner demo", "sourceLanguage": "en-US", "targetLanguages": [ "de", "bg", "ru" ], "domain": "07", "isReviewMandatory": true, "isPostEditingMandatory": true, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4002", "destination": "A8T_000" } ]

66 PUBLICSAP Translation Hub

Development

Page 67: SAP Translation Hub

Sample Code

[ { "id": 1202, "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "es-ES", "fr-FR", "it-IT" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4012", "destination": "A8T_000" }, { "id": 1198, "name": "Texts for partner demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "bg-BG", "ru-RU" ], "domain": "07", "isReviewMandatory": true, "isPostEditingMandatory": true, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Denise Smith", "objectList": "4002", "destination": "A8T_000" } ]

ErrorsIf the URL of the project is incorrect, the following error message will be displayed:

Sample Code

{ "error": { "code": 1013, "message": There is no ABAP project with ID {id}. Please check the URL and try again. }}

SAP Translation HubDevelopment PUBLIC 67

Page 68: SAP Translation Hub

Update an ABAP Translation Project

Access

URL <base URL>/v2/abapProjects/<translation project ID>

HTTP method PUT

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

name The name for the translation project, for example, ABAP texts for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

68 PUBLICSAP Translation Hub

Development

Page 69: SAP Translation Hub

Key Description Type

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

objectList The ID of the object list that you want to translate in the ABAP system.

Required

destination The three-character ABAP system ID and client in which you created the object list that you want to translate.

ExampleA8T_000

Required

Request Example

<base URL>/v2/abapProjects/1202

{ "name": "Texts for sales department demo", "sourceLanguage": "en", "targetLanguages": [ "de", "es", "fr", "da" ], "objectList": "4012", "destination": "A8T_000" }

{ "name": "Texts for sales department demo", "sourceLanguage": "en-US", "targetLanguages": [ "de-DE", "es-ES", "fr-FR", "da-DK" ], "objectList": "4012", "destination": "A8T_000" }

SAP Translation HubDevelopment PUBLIC 69

Page 70: SAP Translation Hub

Response

The response message shows whether the update was successful. To confirm the updates, call the API as described under Get Details of ABAP Translation Projects.

Start the Execution (Translation) of an ABAP Translation Project

Access

URL <base URL>/v2/abapProjects/<translation project ID>/executions

HTTP method POST

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pair in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

operation The workflow operation that you want to execute.

ExamplePULL_TRANSLATE_PUSH, PULL_TRANSLATE, TRANSLATE_PUSH

Required

Request Body Example

{ "operation": "PULL_TRANSLATE" }

Response

The translation response is in JSON format. The response contains the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

operation The workflow operation that was executed. Always in response

70 PUBLICSAP Translation Hub

Development

Page 71: SAP Translation Hub

Key Description Part of Response?

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

createdBy The name of the user who started the translation project ex­ecution.

Always in response

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a project can be divided in multiple smaller bundles called child executions. The childExecutions key comprises an array of the same keys as the main execution.

Always in response

Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

code The code of the log entry. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Sample Code

{ "id": "ccb325e2-3007-4be3-af2b-5c40ad560e5f", "projectId": 1203, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "p1943729810", "createdAt": "2018-07-30 11:13:45.262", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-03 11:13:45.0",

SAP Translation HubDevelopment PUBLIC 71

Page 72: SAP Translation Hub

"code": null, "message": "Action was queued" } ], "childExecutions": null }

Get Information About the Execution (Translation) Progress

Access

URL <base URL>/v2/abapProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method GET

TipIf you want to get information about all executions of a translation project, call the API without the ID of a translation project execution. If you call the API for all translation project executions, the response comprises an array of the translation project executions.

Request

Call the API without any parameters.

Request Example

● Single execution of a translation project: <base URL>/v2/abapProjects/1201/executions/c58811d7-e84c-4e96-b4fb-d43fdea93961

● All executions of a translation project: <base URL>/v2/abapProjects/1201/executions

Response

The translation response is in JSON format. The response contains an array of keys with the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

operation The workflow operation that was executed. Always in response

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

72 PUBLICSAP Translation Hub

Development

Page 73: SAP Translation Hub

Key Description Part of Response?

createdBy The name of the user who started the translation project ex­ecution.

Always in response

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a project can be divided in multiple smaller bundles called child executions. The childExecutions key comprises an array of the same keys as the main execution.

Always in response

Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

code The code of the log entry. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Single Execution of a Translation Project

Sample Code

[ { "id": "c58811d7-e84c-4e96-b4fb-d43fdea93961", "projectId": 1201, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943729810", "createdAt": "2018-07-28 09:22:30.0", "finishedAt": "2018-07-28 09:23:06.0", "cancelled": false, "errors": true, "warnings": null, "log": [], "childExecutions": null } ]

All Executions of a Translation Project

SAP Translation HubDevelopment PUBLIC 73

Page 74: SAP Translation Hub

Sample Code

[ { "id": "c58811d7-e84c-4e96-b4fb-d43fdea93961", "projectId": 1201, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943729810", "createdAt": "2018-07-28 09:22:30.0", "finishedAt": "2018-07-28 09:23:06.0", "cancelled": false, "errors": true, "warnings": null, "log": [], "childExecutions": null }, { "id": "d60c678e-92b8-4f2b-b3c1-a1c39f3eb191", "projectId": 1203, "operation": "PULL_TRANSLATE", "status": "IN_PROGRESS", "percentDone": 0, "createdBy": "p1943729810", "createdAt": "2018-07-28 08:19:35.0", "finishedAt": "2018-07-28 08:20:10.0", "cancelled": false, "errors": true, "warnings": null, "log": [], "childExecutions": null } ]

Get Translations

Access

URL <base URL>/v2/abapProjects/<translation project ID/translations>

HTTP method GET

74 PUBLICSAP Translation Hub

Development

Page 75: SAP Translation Hub

Request

Call the API with the required language as a parameter at the end of the URL:

Key Description Type

language The language code of the translations that you want to re­trieve.

Example<base URL>/v2/abapProjects/1202/translations?language=fr,it or <base URL>/v2/abapProjects/1202/translations?language=fr-FR,it-IT

Optional

Request Example

<base URL>/v2/abapProjects/1202/translations?language=it

<base URL>/v2/abapProjects/1202/translations?language=it-IT

Response

The translation response is in JSON format. The response contains an array of keys with the following key-value pairs. Each array represents the translation of one text.

Key Description Part of Response?

key The unique key of a translation unit. Always in response

displayedKey A readable key of a translation unit; the key is not necessarily unique.

Always in response

translatedText The translated text. Always in response

sourceText The source text that was translated. Always in response

textType An SAP-compliant text type code.

ExampleField labels have the code XFLD.

Always in response

dataType The data type of the translation.

ExamplePlain text.

Always in response

contextNote Additional context information that helps human translators or subject matter experts to find the most fitting translation.

ExampleThe text appears in the details section of the screen in a list of product metadata.

Always in response

SAP Translation HubDevelopment PUBLIC 75

Page 76: SAP Translation Hub

Key Description Part of Response?

sourceLanguage The ISO code of the language of the source text - compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguage The ISO code of the translation - compliant with BCP 47. Always in response

maxWidth The maximum number of characters that the translation should have.

Always in response

changedBy The name of the translator who last edited the translation. Always in response

changedAt The date in UTC when the translation was last updated. Always in response

translationProvider The translation provider for the translation.

ExampleMultilingual text repository (MLTR).

Always in response

status The lifecycle status of the translation.

ExampleIN_REVIEW, TRANSLATED.

Always in response

abapObjectName The technical name of the ABAP object to which the source text belongs.

Always in response

originalLanguage The ISO code of the original language of the source object - compliant with Best Current Practice (BCP) 47.

Always in response

qIndex The quality rating of the translation. The higher the number on a scale from 0-100, the better the quality. For more infor­mation, see Quality Index.

Always in response

Response Body Example

Sample Code

[ { "key": "1e861e2482974d77bb0164a4116b8be3880e4c426334f2b87a5cab5aa2dd6030cc45d2c4d6b304df9dcb3f4dc241ea39558bbe71b09ce89724be78759f84f93b", "displayedKey": "LOG_EXPORT_CAT", "value": "Exportkategorie", "sourceValue": "Export Category", "textType": "XFLD", "dataType": "PLAINTEXT", "contextNote": "The text appears in the details section of the billing screen.", "sourceLanguage": "en", "targetLanguage": "de", "maxWidth": 40, "changedBy": "Sabine Mayer", "changedAt": "2018-06-13T15:18:01.603Z", "source": "MLTR", "qIndex": 90, "sequence": 1, "status": "IN_REVIEW", "abapObjectName": "LOG_EXPORT_CAT", "originalLanguage": "en"

76 PUBLICSAP Translation Hub

Development

Page 77: SAP Translation Hub

}, { "key": "beeb2bb13874a2868dc1639c2d2fc332dab3a6302deb12ce41ff121770c2e7dcf1d8df2c74c3c7af8beaecdeb98f8dae981c7404148f55354ec45ea90a337717", "displayedKey": "LOG_IMPORT_TITLE", "value": "Importkategorie", "sourceValue": "Import Category", "textType": "XFLD", "dataType": "PLAINTEXT", "contextNote": "The text appears in the details section of the billing screen.", "sourceLanguage": "en", "targetLanguage": "de", "maxWidth": 40, "changedBy": "Sabine Mayer", "changedAt": "2018-06-13T15:18:01.603Z", "source": "MLTR", "status": "IN_REVIEW", "abapObjectName": "LOG_IMPORT_TITLE", "originalLanguage": "en", "qIndex": 90 } ]

Sample Code

[ { "key": "1e861e2482974d77bb0164a4116b8be3880e4c426334f2b87a5cab5aa2dd6030cc45d2c4d6b304df9dcb3f4dc241ea39558bbe71b09ce89724be78759f84f93b", "displayedKey": "LOG_EXPORT_CAT", "value": "Exportkategorie", "sourceValue": "Export Category", "textType": "XFLD", "dataType": "PLAINTEXT", "contextNote": "The text appears in the details section of the billing screen.", "sourceLanguage": "en-US", "targetLanguage": "de-DE", "maxWidth": 40, "changedBy": "Sabine Mayer", "changedAt": "2018-06-13T15:18:01.603Z", "source": "MLTR", "qIndex": 90, "sequence": 1, "status": "IN_REVIEW", "abapObjectName": "LOG_EXPORT_CAT", "originalLanguage": "en" }, { "key": "beeb2bb13874a2868dc1639c2d2fc332dab3a6302deb12ce41ff121770c2e7dcf1d8df2c74c3c7af8beaecdeb98f8dae981c7404148f55354ec45ea90a337717", "displayedKey": "LOG_IMPORT_TITLE", "value": "Importkategorie", "sourceValue": "Import Category", "textType": "XFLD", "dataType": "PLAINTEXT", "contextNote": "The text appears in the details section of the billing screen.", "sourceLanguage": "en-US", "targetLanguage": "de-DE", "maxWidth": 40, "changedBy": "Sabine Mayer",

SAP Translation HubDevelopment PUBLIC 77

Page 78: SAP Translation Hub

"changedAt": "2018-06-13T15:18:01.603Z", "source": "MLTR", "status": "IN_REVIEW", "abapObjectName": "LOG_IMPORT_TITLE", "originalLanguage": "en", "qIndex": 90 } ]

Update and Review Translations

Access

URL <base URL>/v2/abapProjects/<translation project ID>/translations

HTTP method PUT

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

key The unique key of a translation unit. Required

displayedKey A readable key of a translation unit; the key is not necessarily unique.

Optional

translatedText The new translation that you want to save. Required

sourceText The source text that was translated. Required

sourceLanguage The ISO code of the language of the source text - compliant with Best Current Practice (BCP) 47.

Optional

targetLanguage The ISO code of the translation that you want to update - compliant with BCP 47.

Required

changedAt The date in UTC when the translation was updated. Optional

status The new lifecycle status that you want to set for the transla­tion.

The possible values are as follows: INITIAL, IN_POST_EDITING, IN_REVIEW, REVIEWED, TRANSLATED, NOT_APPLICABLE.

Optional

78 PUBLICSAP Translation Hub

Development

Page 79: SAP Translation Hub

Key Description Type

abapObjectName The technical name of the ABAP object to which the source text belongs.

Optional

Request Example

<base URL>/v2/abapProjects/1202/translations

[ { "key": "beeb2bb13874a2868dc1639c2d2fc332dab3a6302deb12ce41ff121770c2e7dcf1d8df2c74c3c7af8beaecdeb98f8dae981c7404148f55354ec45ea90a337717", "displayedKey": "LOG_IMPORT_TITLE", "value": "Import-Kategorie", "sourceValue": "Import Category", "sourceLanguage": "en", "targetLanguage": "de", "changedAt": "2018-06-31T15:18:01.603Z", "status": "TRANSLATED", "abapObjectName": "LOG_IMPORT_TITLE" } ]

<base URL>/v2/abapProjects/1202/translations

[ { "key": "beeb2bb13874a2868dc1639c2d2fc332dab3a6302deb12ce41ff121770c2e7dcf1d8df2c74c3c7af8beaecdeb98f8dae981c7404148f55354ec45ea90a337717", "displayedKey": "LOG_IMPORT_TITLE", "value": "Import-Kategorie", "sourceValue": "Import Category", "sourceLanguage": "en-US", "targetLanguage": "de-DE", "changedAt": "2018-06-31T15:18:01.603Z", "status": "TRANSLATED", "abapObjectName": "LOG_IMPORT_TITLE" } ]

ResponseThe response message shows whether the update was successful. To confirm the update, call the API as described under Get Translations in the Response.

Cancel a Specific Execution of an ABAP Translation Project

Access

URL <base URL>/v2/abapProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method DELETE

SAP Translation HubDevelopment PUBLIC 79

Page 80: SAP Translation Hub

Request

Call the API without any parameters.

Request Example

<base URL>/v2/abapProjects/1201/executions/c58811d7-e84c-4e96-b4fb-d43fdea93961

Response

The response message shows whether the deletion was successful. To confirm that the specific execution of the translation project was deleted, call the API as described under Get Information About the Execution (Translation) Progress.

Delete an ABAP Translation Project

Access

URL <base URL>/v2/abapProjects/<translation project ID>

HTTP method DELETE

Request

Call the API with only the ID of the translation project at the end of the URL.

Request Example

<base URL>/v2/abapProjects/1201

Response

The response message shows whether the deletion was successful. To confirm that the translation project was deleted, call the API as described under Get Details of ABAP Translation Projects.

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Building the Base URL of SAP Translation Hub [page 51]Domains [page 13]languages Method [page 54]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]

80 PUBLICSAP Translation Hub

Development

Page 81: SAP Translation Hub

8.4.4 File Translation Project Methods

You can use the API methods to create file translation projects, execute the translation process, and view the details of translation projects.

Getting Started

If you've come to this page from a search, it might look a bit overwhelming. If that's the case, we recommend that you first look at Translation Project API [page 56] to go through some straightforward uses cases and examples for the API.

Access and Authorization

To call the API, you need your user and password for SAP Business Technology Platform. You also need to generate a CSRF-token:

X-CSRF-Token <Token>. Refer to Generating CSRF tokens for public APIs [page 192] for details.

The URL required to call the API comprises the base URL and a method. The details of the URL and method are listed under Access in the following sections.

Create a File Translation Project

Access

URL <base URL>/v2/fileProjects

HTTP method POST

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

SAP Translation HubDevelopment PUBLIC 81

Page 82: SAP Translation Hub

NoteTo better understand the keys, see the sample code for the request body below the table.The translation response is in JSON format and contains the following key-value pairs:

Key Description Type

name The name for the translation project, for example, Texts in properties file for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

82 PUBLICSAP Translation Hub

Development

Page 83: SAP Translation Hub

Key Description Type

escapeNonAscii Determines whether you want machine-readable texts in the translated file. The file will contain Unicode escape sequen­ces for non-ASCII characters ( \uxxxx).

NoteThis option is required only if you want to translate a Java .properties files with ISO-8859-1 encoding and you need to interpret the content.

Optional

fileType The type of file that you want to translate. The permitted en­tries are ABAPXLIFF, ANDROID_XML, HDBTEXTBUNDLE, INIXLIFF, IOSSTRINGS, IOSXLIFF, JSON, PROPERTIES, SBSXLIFF, and XLIFF. For more informa­tion about the file types, see Supported File Formats [page 211].

NoteFileType can be set at project creation time only. Setting it at a later time is not possible. If you do not enter a File­Type, the API assumes that the file is a .properties file (PROPERTIES).

Optional

Request Body Example

{ "name": "Properties file for sales app", "sourceLanguage": "en", "targetLanguages": [ "es", "pt" ], "domain": "05", "isReviewMandatory": true }

{ "name": "Properties file for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "es-ES", "pt-BR" ], "domain": "05", "isReviewMandatory": true }

Response

SAP Translation HubDevelopment PUBLIC 83

Page 84: SAP Translation Hub

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, Texts in properties file for sales demo.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

84 PUBLICSAP Translation Hub

Development

Page 85: SAP Translation Hub

Key Description Part of Response?

escapeNonAscii Shows whether you want machine-readable texts in the translated file. The file contains Unicode escape sequences for non-ASCII characters ( \uxxxx).

Always in response

fileType The type of file that you translated. Always in response

Response Body Example

Sample Code { "id": 1530, "name": "Properties file for sales app", "sourceLanguage": "en", "targetLanguages": [ "es", "pt" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }

Sample Code { "id": 1531, "name": "Properties file for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "es-ES", "pt-BR" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }

Error code

If the attributes are not identified by either the API or in any other way, the following error message will be displayed:

Sample Code

{ "error": { "code": 1123,

SAP Translation HubDevelopment PUBLIC 85

Page 86: SAP Translation Hub

"message": "Property [checkType] is not recognized. Please refer to the API documentation." }}

Get Details of File Translation Projects

Access

URL <base URL>/v2/fileProjects/<translation project ID>

HTTP method GET

RequestCall the API with only the ID of the translation project at the end of the URL.

TipIf you want to get all translation projects that were created in a specific subaccount, call the API without the ID of the translation project. If you call the API for all translation projects, the response comprises an array of the individual translation projects.

Request Example

● Single translation project: <base URL>/v2/fileProjects/1530● Single translation project: <base URL>/v2/fileProjects/1531● All translation projects: <base URL>/v2/fileProjects

ResponseThe translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, Texts in properties file for sales demo.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

86 PUBLICSAP Translation Hub

Development

Page 87: SAP Translation Hub

Key Description Part of Response?

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

escapeNonAscii Shows whether you want machine-readable texts in the translated file. The file contains Unicode escape sequences for non-ASCII characters ( \uxxxx).

Always in response

Response Body Example

Single Translation Project

Sample Code {

SAP Translation HubDevelopment PUBLIC 87

Page 88: SAP Translation Hub

"id": 1530, "name": "Properties file for sales app", "sourceLanguage": "en", "targetLanguages": [ "es", "pt" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }

Sample Code { "id": 1531, "name": "Properties file for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "es-ES", "pt-BR" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }

All Translation Projects

Sample Code

[ { "id": 1530, "name": "Properties file for sales app", "sourceLanguage": "en", "targetLanguages": [ "es", "pt" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "isLQEEnabled": true, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }, { "id": 1536, "name": "Properties file for Cristina's demo", "sourceLanguage": "en",

88 PUBLICSAP Translation Hub

Development

Page 89: SAP Translation Hub

"targetLanguages": [ "pt" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": true, "isLQEEnabled": true, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" } ]

Sample Code

[ { "id": 1531, "name": "Properties file for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "es-ES", "pt-BR" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": false, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" }, { "id": 1537, "name": "Properties file for Cristina's demo", "sourceLanguage": "en-US", "targetLanguages": [ "pt-PT" ], "domain": "07", "isReviewMandatory": true, "isPostEditingMandatory": true, "companyMltrId": null, "createdByUserId": "p1943729810", "createdByUserName": "Cristina Lopez", "escapeNonAscii": false, "fileType": "PROPERTIES" } ]

Errors

If the project ID is not available or valid, the following error message will be displayed:

Sample Code

{ "error": { "code": 1008,

SAP Translation HubDevelopment PUBLIC 89

Page 90: SAP Translation Hub

"message": "We can’t seem to find project 6329499. Please check your entry and try again. If you’re sure it’s correct, you may have deleted it already." }}

If the URL of the project is incorrect, the following error message will be displayed:

Sample Code

{ "error": { "code": 1013, "message": There is no File project with ID {id}. Please check the URL and try again. }}

Update a File Translation Project

Access

URL <base URL>/v2/fileProjects/<translation project ID>

HTTP method PUT

RequestThe API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

name The name for the translation project, for example, Texts in properties file for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

90 PUBLICSAP Translation Hub

Development

Page 91: SAP Translation Hub

Key Description Type

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

fileType The type of file that you want to translate. The permitted en­tries are ABAPXLIFF, ANDROID_XML, HDBTEXTBUNDLE, INIXLIFF, IOSSTRINGS, IOSXLIFF, JSON, PROPERTIES, SBSXLIFF, and XLIFF. For more informa­tion about the file types, see Supported File Formats [page 211].

NoteFileType can be set at project creation time only. Setting it at a later time is not possible. If you do not enter a File­Type, the API assumes that the file is a .properties file (PROPERTIES).

Optional

Request Example

<base URL>/v2/fileProjects/1530

{

SAP Translation HubDevelopment PUBLIC 91

Page 92: SAP Translation Hub

"name": "Properties file for sales app", "sourceLanguage": "en", "targetLanguages": [ "es" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": true}

<base URL>/v2/fileProjects/1531

{ "name": "Properties file for sales app", "sourceLanguage": "en-US", "targetLanguages": [ "es-ES" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": true}

Response

The response message shows whether the update was successful. To confirm the updates, call the API as described under Get Details of File Translation Projects.

Upload a File to a File Translation Project

Access

URL <base URL>/v2/fileProjects/<translation project ID >/files

HTTP method POST

Request

To upload a file, the API requires the form-data body type and the following keys:

Key Description Type

file The file that you want to upload.

NoteDepending on your REST client, you might need to specify the attribute of this key as file. You can find more information about file types here: Supported File Formats.

Required

92 PUBLICSAP Translation Hub

Development

Page 93: SAP Translation Hub

Key Description Type

filePath The path to which you want to down­load the translated data (see the file key). You must specify the attribute of this key as text.

Examplesrc/i18n

Optional

pathToGenerateTranslations The relative path to the folder in which you want the API to place the translated files. Use this key only if you want the API to place the translated files in a folder - such as a subfolder specific for the translated files - that differs from the folder that contains the source files.

You must specify the attribute of this key as text.

The value of the key must match the following pattern: {sourcePath}/values_{targetLanguage}/{defaultTargetFileName}

● {sourcePath} represents the value of the filePath key; if re­quired, you can enter a different path manually

● values_ must not be changed.

● {targetLanguage} represents the two-character language code of the target languages specified in the translation project and must not be changed

● {defaultTargetFileName} represents the file name of the translated files and must not be changed

Optional

NoteYou don't need to specify the content type of the file you want to upload. You can upload the file directly.

Request Example

<base URL>/v2/fileProjects/1530/files

SAP Translation HubDevelopment PUBLIC 93

Page 94: SAP Translation Hub

Response

The translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the file that you upload. You use this ID in subse­quent API calls to perform different actions.

Always in response

pathToFile The path to the file that contains the source texts to be translated and the file name.

NoteIf you do not specify a path in the request, the value of this key is the file name only.

Always in response

pathToGenerateTranslations The path and file name information for the location of the translated files that the API places in a ZIP file that you later download.

NoteIf you do not use this key in the request, the value of this key in the response is null.

Only in response if specified in request

uploadedAt The date in UTC when the file was uploaded to a translation project.

Always in response

uploadedByUserId The ID of the user who uploaded the file to the translation project.

Always in response

Response Body Example

Sample Code

{ "id": "lu_lPjaYJ9ocIe0kBo_AuF57mvom5uKstpKAtZ2pkaA", "pathToFile": "src/i18n/i18n.properties", "pathToGenerateTranslations": "{sourcePath}/values_{targetLanguage}/{defaultTargetFileName} ", "uploadedAt": "Thu Jul 05 11:34:48 UTC 2018", "uploadedByUserId": "p1943729810" }

Error code

If the file type is invalid, the following error message will be displayed:

Sample Code

{ "error": { "code": 1127, "message": "The file type you have specified is invalid." }}

94 PUBLICSAP Translation Hub

Development

Page 95: SAP Translation Hub

Start the Execution (Translation) of Translation Projects

Access

URL <base URL>/v2/fileProjects/<translation project ID>/files/<file ID>/executions

HTTP method POST

To get the ID of a file in a translation project, see the files key in the response for Get Details of File Translation Projects.

RequestThe API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you don't use this content type, the API call fails.

TipTo start the execution of all files in a translation project, call the API without /files/<file ID> in the URL. If you call the API for all files, the response comprises an array of executions for all files in the translation project.

Request Example

● For execution of all files in a project: <base URL>/v2/fileProjects/<translation project ID/executions

● For execution of single file in the project: <base URL>/v2/fileProjects/<translation project ID>/files/<file ID>/executions

The following table shows the key-value pairs in the JSON request:

Key Description Type

operation The operation specifies the execution type that the user has provided.

ExamplePULL_TRANSLATE

Required

NoteTo better understand the keys, see the sample code for the request body below the table.

Request Body Example

{ "operation": "PULL_TRANSLATE" }

SAP Translation HubDevelopment PUBLIC 95

Page 96: SAP Translation Hub

ResponseThe translation response is in JSON format. The response contains the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

createdBy The name of the user who started the translation project ex­ecution.

Always in response

fileId The ID of the file to which the source text belongs. Always in response.

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a translation project is divided up among the files in the translation project. For each file, there is a childExecutions key that can in turn contain one or more childExecutions keys. Each childExecutions key comprises an array of the same keys as the main execution.

Always in response

Log Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

code The code of the log entry. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Execution for a Single File in a Translation Project

Sample Code

{ "id": "080654d4-8557-41f2-96fd-8954c1e6d0be",

96 PUBLICSAP Translation Hub

Development

Page 97: SAP Translation Hub

"projectId": 1530, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.062", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "3400791e-2840-4ded-b6c7-4b135fe9cb0f", "projectId": 152284, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] }

Execution for All Files in a Translation Project

Sample Code

{ "id": "080654d4-8557-41f2-96fd-8954c1e6d0be", "projectId": 1530, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.062", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued"

SAP Translation HubDevelopment PUBLIC 97

Page 98: SAP Translation Hub

} ], "childExecutions": [ { "id": "3400791e-2840-4ded-b6c7-4b135fe9cb0f", "projectId": 152284, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null }, { "id": "f7aead20-e145-4f10-a9a9-82a8f79fa913", "projectId": 152284, "operation": "PULL_TRANSLATE", "status": "CREATED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 10:27:13.0", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 10:27:13.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] }

Errors

If the the operation type is invalid, the following error message will be displayed:

Sample Code

{ "error": { "code": 99, "message": "Asynchronous process could not be completed due to user interactions." }}

98 PUBLICSAP Translation Hub

Development

Page 99: SAP Translation Hub

If a translation project is re-executed while the current process is still running, the following error message will be displayed:

Sample Code

{ "error": { "code": 1114, "message": "The translation project {0} is being executed. Please wait for the execution to finish or if you don\u2019t need it anymore, cancel it (executionId : {1})." }}

If you have specified an invalid file path, the following errror message will be displayed:

Sample Code

{ "error": { "code": 1125, "message": "The file path specified is invalid.” }}

Get Information About the Execution (Translation) Progress

Access

URL <base URL>/v2/fileProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method GET

To get the ID of Translation Project Execution, see the ID key in the response for Start the Execution (Translation) of Translation Projects.

TipIf you want to get information about all executions of a translation project, call the API without the ID of a translation project execution. If you call the API for all translation project executions, the response comprises an array of the translation project executions.

Request

Call the API without any parameters.

Request Example

● Single execution of a translation project: <base URL>/v2/fileProjects/1530/executions/080654d4-8557-41f2-96fd-8954c1e6d0be

SAP Translation HubDevelopment PUBLIC 99

Page 100: SAP Translation Hub

● All executions of a translation project: <base URL>/v2/fileProjects/1530/executions

ResponseThe translation response is in JSON format. The response contains an array of keys with the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

operation The workflow operation that was executed. Always in response

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

createdBy The name of the user who started the translation project ex­ecution.

Always in response

fileID The ID of the file to which the source text belongs. Always in response.

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a translation project is divided up among the files in the translation project. For each file, there is a childExecutions key that can in turn contain one or more childExecutions keys. Each childExecutions key comprises an array of the same keys as the main execution.

Always in response

Log Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

code The code of the log entry. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Single Execution of a Translation Project

100 PUBLICSAP Translation Hub

Development

Page 101: SAP Translation Hub

Sample Code

{ "id": "080654d4-8557-41f2-96fd-8954c1e6d0be", "projectId": 1530, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "Cristina Lopez", "fileID":"fahCmp9Dz_8clFDVF07wbFpr4F4Mppp4vx04eZw" "createdAt": "2018-07-30 09:59:03.0", "finishedAt": "2018-07-30 09:59:50.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "3400791e-2840-4ded-b6c7-4b135fe9cb0f", "projectId": 1530, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": "2018-07-30 09:59:50.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:21.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:18.0", "code": "percent-done", "message": "Done 92 percent" },

SAP Translation HubDevelopment PUBLIC 101

Page 102: SAP Translation Hub

{ "type": "INFO", "createdAt": "2018-07-30 09:59:15.0", "code": "percent-done", "message": "Done 92 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:12.0", "code": "percent-done", "message": "Done 0 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:11.0", "code": "translation-started", "message": "Translation started" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null, } ] }

All Executions of a Translation Project

Sample Code

[ { "id": "080654d4-8557-41f2-96fd-8954c1e6d0be", "projectId": 1530, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": "2018-07-30 09:59:50.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "3400791e-2840-4ded-b6c7-4b135fe9cb0f", "projectId": 1530,

102 PUBLICSAP Translation Hub

Development

Page 103: SAP Translation Hub

"operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 100, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": "2018-07-30 09:59:50.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:50.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:21.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:12.0", "code": "percent-done", "message": "Done 0 percent" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:11.0", "code": "translation-started", "message": "Translation started" }, { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null, } ] }, { "id": "080654d4-8557-41f2-95fd-8954c1e6d0be", "projectId": 1530, "operation": "PULL_TRANSLATE", "status": "COMPLETED", "percentDone": 0, "createdBy": "Cristina Lopez", "createdAt": "2018-07-30 09:59:03.0", "finishedAt": "2018-07-30 09:59:50.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 09:59:03.0",

SAP Translation HubDevelopment PUBLIC 103

Page 104: SAP Translation Hub

"code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null, } ]

Error code

If the incorrect execution ID is used, the following error message will be displayed:

Sample Code

{ "error": { "code": 1002, "message": "We can’t seem to find an execution instance with ID 5ac8fcf0-d490-46ee-9266-6ab05c14dd9f123; please check your entry and try again." }}

Get Translations in the Response

Access

URL <base URL>/v2/fileProjects/<translation project ID>/files/<file ID>/translations

HTTP method GET

To get the ID of a file in a translation project, see the files key in the response for Get Details of File Translation Projects.

TipIf you want to get the translations for all files in a translation project, call the API without /files/<file ID> in the URL.

Request

You can call the API without any parameters. If you want to get translations in only one language, you can use the following query parameter at the end of the URL:

Key Description Type

language If you want to retrieve the translations in only one language, specify the required language code.

Optional

Request Example

104 PUBLICSAP Translation Hub

Development

Page 105: SAP Translation Hub

● Get the translations for a single file: <base URL>/v2/fileProjects/1530/files/6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc/translations?language=es or ?language=es-ES

● Get the translations for all files in a translation project: <base URL>/v2/fileProjects/1530/translations?language=es or ?language=es-ES

NoteIt is also possible to get files with multiple languages. To do this, provide the language codess spearated by a comma.

Request Example

<base URL>v2/abapProjects/153822/translations?language=de,it,fr

<base URL>v2/abapProjects/153823/translations?language=de-DE,it-IT,fr-FR

Response

Key Description Part of Response?

key The unique key of a translation unit. Always in response

displayedKey A readable key of a translation unit; the key is not necessarily unique.

Always in response

translatedText The translated text. Always in response

sourceText The source text that was translated. Always in response

textType An SAP-compliant text type code.

ExampleField labels have the code XFLD.

Always in response

dataType The data type of the translation.

ExamplePlain text.

Always in response

contextNote Additional context information that helps human translators or subject matter experts to find the most fitting translation.

ExampleThe text appears in the details section of the screen in a list of product metadata.

Always in response

sourceLanguage The ISO code of the language of the source text - compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguage The ISO code of the translation - compliant with BCP 47. Always in response

maxWidth The maximum number of characters that the translation should have.

Always in response

changedBy The name of the translator who last edited the translation. Always in response

SAP Translation HubDevelopment PUBLIC 105

Page 106: SAP Translation Hub

Key Description Part of Response?

changedAt The date in UTC when the translation was last updated. Always in response

translationProvider The translation provider for the translation.

ExampleMultilingual text repository (MLTR).

Always in response

status The lifecycle status of the translation.

ExampleIN_REVIEW, TRANSLATED.

Always in response

qIndex The quality rating of the translation. The higher the number on a scale from 0-100, the better the quality. For more infor­mation, see Quality Index.

Always in response

Sample Code

[ { "key": "shellTitle", "displayedKey": "shellTitle", "value": "Tien", "sourceValue": "Shop ", "textType": "", "dataType": "PLAINTEXT", "contextNote": "", "sourceLanguage": "en", "targetLanguage": "es", "maxWidth": null, "changedBy": "", "fileId":"", "changedAt": "2018-07-30T11:27:41.278Z", "source": "MLTR", "sequence": 0, "status": "IN_REVIEW", "fileId": "6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc", "qIndex": 77 }, { "key": "xtit.products", "displayedKey": "xtit.products", "value": "Productos", "sourceValue": "Products", "textType": "XTIT", "dataType": "PLAINTEXT", "contextNote": "", "sourceLanguage": "en", "targetLanguage": "es", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T11:27:41.295Z", "source": "MLTR", "sequence": 1, "status": "IN_REVIEW", "fileId": "miQ26XqjXji-0Vj_jy7pZU3K5qaZBooOIaYN-bde3c4", "qIndex": 97 }

106 PUBLICSAP Translation Hub

Development

Page 107: SAP Translation Hub

]

Sample Code

[ { "key": "shellTitle", "displayedKey": "shellTitle", "value": "Tien", "sourceValue": "Shop ", "textType": "", "dataType": "PLAINTEXT", "contextNote": "", "sourceLanguage": "en-US", "targetLanguage": "es-ES", "maxWidth": null, "changedBy": "", "fileId":"", "changedAt": "2018-07-30T11:27:41.278Z", "source": "MLTR", "sequence": 0, "status": "IN_REVIEW", "fileId": "6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc", "qIndex": 77 }, { "key": "xtit.products", "displayedKey": "xtit.products", "value": "Productos", "sourceValue": "Products", "textType": "XTIT", "dataType": "PLAINTEXT", "contextNote": "", "sourceLanguage": "en-US", "targetLanguage": "es-ES", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T11:27:41.295Z", "source": "MLTR", "sequence": 1, "status": "IN_REVIEW", "fileId": "miQ26XqjXji-0Vj_jy7pZU3K5qaZBooOIaYN-bde3c4", "qIndex": 97 } ]

Cancel a Specific Execution of a File Translation Project

Access

URL <base URL>/v2/fileProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method DELETE

To get the ID of Translation Project Execution, see the ID key in the response for Start the Execution (Translation) of Translation Projects.

SAP Translation HubDevelopment PUBLIC 107

Page 108: SAP Translation Hub

RequestCall the API without any parameters.

Request Example

<base URL>/v2/fileProjects/1530/executions/c58811d7-e84c-4e96-b4fb-d43fdea93961

ResponseThe response message shows whether the cancellation was successful. To confirm that the specific execution of the translation project was cancelled, call the API as described under Get Information About the Execution (Translation) Progress.

Delete a File in a File Translation Project

Access

URL <base URL>/v2/fileProjects/<translation project ID>/files/<file ID>

HTTP method DELETE

To get the ID of a file in a translation project, see the files key in the response for the Upload a File to a File Translation Project.

RequestCall the API as described in the Access section.

Request Example

<base URL>/v2/fileProjects/1531/files/6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc

ResponseThe response message shows whether the deletion was successful. To confirm that the file was deleted, call the API as described under Get Details of File Translation Projects.

Delete a File Translation Project

Access

URL <base URL>/v2/fileProjects/<translation project ID>

HTTP method DELETE

RequestCall the API with only the ID of the translation project at the end of the URL.

Request Example

108 PUBLICSAP Translation Hub

Development

Page 109: SAP Translation Hub

<base URL>/v2/fileProjects/1531

ResponseThe response message shows whether the deletion was successful. To confirm that the translation project was deleted, call the API as described under Get Details of File Translation Projects.

Download Translations in a ZIP File

Access

URL <base URL>/v2/fileProjects/<translation project ID>/files/<file ID>/content

HTTP method GET

To get the ID of a file in a translation project, see the files key in the response for Get Details of File Translation Projects.

TipTo download translations of all files in a translation project, call the API without /<file ID> in the URL. See the example in the Request section.

RequestCall the API with only the ID of the translation project and the ID of the file in the URL.

Request Example

● Translations for a single file: <base URL>/v2/fileProjects/1530/files/6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc/content

● Translations for all files in a translation project: <base URL>/v2/fileProjects/1530/files/content

Download the ZIP file by calling the URL in a browser.

ResponseThe zip files contains the translated files in the following format: <source file name>_<target language code>.<extension>.

ErrorsIf the translation project has status Initial and no source files have been uploaded yet, the following error message will be displayed:

Sample Code

{ "error": { "code": 1011,

SAP Translation HubDevelopment PUBLIC 109

Page 110: SAP Translation Hub

"message": “Project {projectId} does not have any source files. As a result, there are no files to download. Please check the content and try again” }}

If the file ID mentioned to retrieve the content is wrong or does not belong to the current translation project, the following error message will be displayed:

Sample Code

{ "error": { "code": 1116, "message": "We can\u2019t seem to find a file with the ID {0}. Please check that the file still exists and that the path is correct." }}

If the translation project has status Initial and no translations have been carried out on the provided source files yet, the following error message will be displayed:

Sample Code

{ "error": { "code": 1012, "message": Project {projectId} has status INITIAL and no translations have been carried out. You can’t download any translated files yet. }}

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Building the Base URL of SAP Translation Hub [page 51]Domains [page 13]languages Method [page 54]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]

110 PUBLICSAP Translation Hub

Development

Page 111: SAP Translation Hub

8.4.5 Git Translation Project Methods

You can use the API methods to create Git translation projects, execute the translation process, and view the details of translation projects.

Getting Started

If you've come to this page from a search, it might look a bit overwhelming. If that's the case, we recommend that you first look at Translation Project API [page 56] to go through some straightforward uses cases and examples for the API.

Access and Authorization

To call the API, you need your user and password for SAP Business Technology Platform. You also need to generate a CSRF-token:

X-CSRF-Token <Token>. Refer to Generating CSRF tokens for public APIs [page 192] for details.

The URL required to call the API comprises the base URL and a method. The details of the URL and method are listed under Access in the following sections.

Create a Git Translation Project

Access

URL <base URL>/v2/gitProjects

HTTP method POST

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

SAP Translation HubDevelopment PUBLIC 111

Page 112: SAP Translation Hub

Key Description Type

name The name for the translation project, for example, Texts in Web Git project for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

112 PUBLICSAP Translation Hub

Development

Page 113: SAP Translation Hub

Key Description Type

escapeNonAscii Determines whether you want machine-readable texts in the translated file. The file will contain Unicode escape sequen­ces for non-ASCII characters ( \uxxxx).

NoteThis option is required only if you want to translate a Java .properties files with ISO-8859-1 encoding and you need to interpret the content.

Optional

importExistingTranslations If you already translated the texts in your .properties file, for example, using a different translation provider to SAP Translation Hub, your application already contains transla­tions in language-specific .properties files. You use the Keep Translations option to determine how SAP Translation Hub handles these existing translations:

● If you want to keep the existing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application, choose Yes.

NoteWhen you use SAP Translation Hub to translate the texts in your .properties file, SAP Translation Hub stores the translations. If you use SAP Transla­tion Hub to translate your .properties file a sec­ond or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous translation of the .properties file.

If you change any translations directly in the lan­guage-specific .properties files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ignores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Trans­lation Hub.

● If you want SAP Translation Hub to translate all the texts in your .properties file from scratch, and therefore overwrite any existing translations in your .properties files, choose No.

Optional

SAP Translation HubDevelopment PUBLIC 113

Page 114: SAP Translation Hub

Key Description Type

gitType The source of the Git repository where the files that you want to translate are stored. The permitted entries are SAP Git service, hosted on the Web, and hosted by Enterprise. For more information about the different Git repositories, see Git Repositories [page 217].

Required

branch The name of the Git branch.

Examplemaster

Required

fileType The type of file that you want to translate. The permitted en­tries are ABAPXLIFF, ANDROID_XML, HDBTEXTBUNDLE, INIXLIFF, IOSSTRINGS, IOSXLIFF, JSON, PROPERTIES, SBSXLIFF, and XLIFF. For more informa­tion about the file types, see Supported File Formats [page 211].

NoteFileType can be set at project creation time only. Setting it at a later time is not possible. If you do not enter a File­Type, the API assumes that the file is a .properties file (PROPERTIES).

Optional

files The files key comprises an array for files that you want to translate.

For each file, there is a pathToFile key. The value of the key is the path in your Git repository to the file that contains the source texts to be translated.

Examplei18n/i18n.properties

For details, see the table for the files key below.

Required

114 PUBLICSAP Translation Hub

Development

Page 115: SAP Translation Hub

Key Description Type

credentials The credentials key comprises a set of keys that provide user log-on information for the Git repository. For details, see the table for the credentials key below.

NoteYou can specify the credentials when you create a trans­lation project or when you execute the translation project.

NoteWhen the credentials are not provided (credentials : null), credentials attribute is not displayed.

Optional

SAP Translation HubDevelopment PUBLIC 115

Page 116: SAP Translation Hub

Key Description Type

repository Server Type: SAP Git Service

Description: Application names need to follow certain patterns: The first char­acter needs to be a lowercase letter. The subsequent characters can be low­ercase letters or numbers.

Server Type: Web / Enterprise

Description: There is a regular expres­sion check done by the system to check if the Git URL is valid.

NoteIf the system finds an error in the application name or the Git URL, the user will get an error.

If the Git URL is empty or invalid, the system throws an error and dis­plays the message "Please enter a valid Git URL. Valid Git URLs start with https:// or http://."

If the application name is empty, the system throws an error and dis­plays the message "The application name cannot be empty."

If the application name is invalid, the system throws an error and dis­plays the message "The application name is invalid. Application names have to follow certain rules. Start with a lowercase letter; after that, you can use lowercase letters or numbers."

Required

files Key Description Type

pathToFile For each file, there is a pathToFile key. The value of the key is the path in your Git repository to the file that contains the source texts to be translated.

Examplei18n/i18n.properties

Required

116 PUBLICSAP Translation Hub

Development

Page 117: SAP Translation Hub

files Key Description Type

pathToGenerateTranslations If you need to specify further the loca­tion of each file generated, you can use this parameter. This is of the format {sourcePath}/values_{targetLan­guage}/{defaultTargetFileName}

Here {SourcePath} is replaced by file-Path,{ targetLanguage} with what is specified while project creation and {defaultFileName} with the translated file Names.

Optional

Credentials Key Description Type

user The ID of the user that accesses the Git repository. Required

email The e-mail address of the user that accesses the Git reposi­tory.

Required

password The password of the user that accesses the Git repository for SAP Git service and Web Git. For Enterprise GitHub, use the personal access token. To create a personal access to­ken, refer https://help.github.com/en/enterprise/2.18/user/github/authenticating-to-github/creating-a-personal-ac­cess-token-for-the-command-line .

Required

Request Body Example

{ "name": "Cloud app in GitHub", "sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru" ], "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "files": [ { "pathToFile": "i18n/i18n.properties" } ], "credentials": { "user": "matzhao", "email": "[email protected]", "password": "*************" } }

Sample Code

"name": "Cloud app in GitHub", "sourceLanguage": "en-US", "targetLanguages": [

SAP Translation HubDevelopment PUBLIC 117

Page 118: SAP Translation Hub

"it-IT", "fr-FR", "ru-RU" ], "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "files": [ { "pathToFile": "i18n/i18n.properties" } ], "credentials": { "user": "matzhao", "email": "[email protected]", "password": "*************" } }

ResponseThe translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, Cloud app in GitHub.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

118 PUBLICSAP Translation Hub

Development

Page 119: SAP Translation Hub

Key Description Part of Response?

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

escapeNonAscii Shows whether you want machine-readable texts in the translated file. The file contains Unicode escape sequences for non-ASCII characters ( \uxxxx).

Always in response

SAP Translation HubDevelopment PUBLIC 119

Page 120: SAP Translation Hub

Key Description Part of Response?

importExistingTranslations If you already translated the texts in your source file, for ex­ample, using a different translation provider to SAP Transla­tion Hub, your application already contains translations in language-specific files. This option determines how SAP Translation Hub handles these existing translations:

● If the value of this key is true, you want to keep the exist­ing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application.

NoteWhen you use SAP Translation Hub to translate the texts in your source file, SAP Translation Hub stores the translations. If you use SAP Translation Hub to translate your source file a second or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous trans­lation of the source file.

If you change any translations directly in the lan­guage-specific files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ig­nores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Trans­lation Hub.

● If the value of this key is false, you want SAP Translation Hub to translate all the texts in your source file from scratch, and therefore overwrite any existing transla­tions in the language-specific files.

Always in response

gitType The source of the Git repository where the files that you want to translate are stored. For more information about the dif­ferent Git repositories, see Git Repositories [page 217].

Always in response

branch The name of the Git branch.

Examplemaster

Always in response

fileType The type of file that you translated. Always in response

120 PUBLICSAP Translation Hub

Development

Page 121: SAP Translation Hub

Key Description Part of Response?

files The files key comprises an array of keys that contain infor­mation about the file in the Git repository that you want to translate. For each file that you want to translate, there is a set of keys in the array. For details, see the following table.

Always in response

Files Key Description Type

id The ID of the file.

Example4e6533f8-8580-48e6-85bb-c51d8d661288

Always in response

pathToFile The path in your Git repository to the file that contains the source texts to be translated.

Examplei18n/i18n.properties

Always in response

Response Body Example

Sample Code

{ "id": 170003, "name": "Cloud app in GitHub", "sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru" ], "domain": "", "isReviewMandatory": false, "isPostEditingMandatory": false, "companyMltrId": null, "addedByUserId": "matzhao", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "bce2f411-bced-4477-a9f6-ad2e19994a6a", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2018-12-18 08:55:29.0", "addedByUserId": "matzhao", "size": null } ], "credentials": null }

SAP Translation HubDevelopment PUBLIC 121

Page 122: SAP Translation Hub

Sample Code

{ "id": 170004, "name": "Cloud app in GitHub", "sourceLanguage": "en", "targetLanguages": [ "it-IT", "fr-FR", "ru-RU" ], "domain": "", "isReviewMandatory": false, "isPostEditingMandatory": false, "companyMltrId": null, "addedByUserId": "matzhao", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "bce2f411-bced-4477-a9f6-ad2e19994a6a", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2018-12-18 08:55:29.0", "addedByUserId": "matzhao", "size": null } ], "credentials": null }

ErrorsIf you are trying to translate a file whose format is not *.properties, the following error message is displayed:

Sample Code

{ "error": { "code": 1118, "message": "The file type {0} is not supported for Git scenarios; please use a different file type.” }}

122 PUBLICSAP Translation Hub

Development

Page 123: SAP Translation Hub

Get Details of Git Translation Project

Access

URL <base URL>/v2/gitProjects/<translation project ID>

HTTP method GET

RequestCall the API with only the ID of the translation project at the end of the URL.

TipIf you want to get all translation projects that were created in a specific subaccount, call the API without the ID of the translation project. If you call the API for all translation projects, the response comprises an array of the individual translation projects.

Request Example

● Single translation project: <base URL>/v2/gitProjects/1560● All translation projects: <base URL>/v2/gitProjects

ResponseThe translation response is in JSON format and contains the following key-value pairs:

Key Description Part of Response?

id The ID of the translation project. You use this ID in subse­quent API calls, for example to translate the texts in the translation project.

Always in response

name The name for the translation project, for example, Cloud app in GitHub.

Always in response

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

If you do not specify any target languages, the API returns the texts in all available target languages.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Always in response

SAP Translation HubDevelopment PUBLIC 123

Page 124: SAP Translation Hub

Key Description Part of Response?

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Always in response

isReviewMandatory Shows whether you enabled the review step on the transla­tion project UI. You use the step and the corresponding life­cycle status for each text to manage the review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

isPostEditingMandatory Shows whether you enabled the post-editing step on the translation project UI. You use this step and the correspond­ing lifecycle statuses for each text to manage the post-edit­ing and review process. For more information, see Managing Post-Editing and Review Steps.

Always in response

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Always in response

addedByUserId The ID of the user who created the translation project. Always in response

createdByUserName The name of the user who created the translation project. Always in response

escapeNonAscii Shows whether you want machine-readable texts in the translated file. The file contains Unicode escape sequences for non-ASCII characters ( \uxxxx).

Always in response

124 PUBLICSAP Translation Hub

Development

Page 125: SAP Translation Hub

Key Description Part of Response?

importExistingTranslations If you already translated the texts in your source file, for ex­ample, using a different translation provider to SAP Transla­tion Hub, your application already contains translations in language-specific files. This option determines how SAP Translation Hub handles these existing translations:

● If the value of this key is true, you want to keep the exist­ing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application.

NoteWhen you use SAP Translation Hub to translate the texts in your source file, SAP Translation Hub stores the translations. If you use SAP Translation Hub to translate your source file a second or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous trans­lation of the source file.

If you change any translations directly in the lan­guage-specific files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ig­nores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Trans­lation Hub.

● If the value of this key is false, you want SAP Translation Hub to translate all the texts in your source file from scratch, and therefore overwrite any existing transla­tions in the language-specific files.

Always in response

gitType The source of the Git repository where the files that you want to translate are stored. For more information about the dif­ferent Git repositories, see Git Repositories [page 217].

Always in response

branch The name of the Git branch.

Examplemaster

Always in response

fileType The type of file that you translated. Always in response

SAP Translation HubDevelopment PUBLIC 125

Page 126: SAP Translation Hub

Key Description Part of Response?

files The files key comprises an array of keys that contain infor­mation about the file in the Git repository that you want to translate. For each file that you want to translate, there is a set of keys in the array. For details, see the following table.

Always in response

Key Description Part of response?

repository The URL of the Git repository. If the Git repository is on SAP Business Technol­ogy Platform and you entered only the name of the Git repository in the re­quest, only the name appears in the re­sponse. The URL is determined auto­matically.

Always in response

Files Key Description Type

id The ID of the file.

Example4e6533f8-8580-48e6-85bb-c51d8d661288

Always in response

pathToFile The path in your Git repository to the file that contains the source texts to be translated.

Examplei18n/i18n.properties

Always in response

Response Body Example

Single Translation Project

Sample Code

{ "id": 1560, "name": "Cloud app in GitHub", "sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru" ], "domain": "", "isReviewMandatory": false, "isPostEditingMandatory": false, "companyMltrId": null, "addedByUserID": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES",

126 PUBLICSAP Translation Hub

Development

Page 127: SAP Translation Hub

"files": [ { "id": "4e6533f8-8580-48e6-85bb-c51d8d661288", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2018-07-28 09:10:30.0", "addedByUserId": "p1943121765", "size": null } ] }

Sample Code

{ "id": 1561, "name": "Cloud app in GitHub", "sourceLanguage": "en-US", "targetLanguages": [ "it-IT", "fr-FR", "ru-RU" ], "domain": "", "isReviewMandatory": false, "isPostEditingMandatory": false, "companyMltrId": null, "addedByUserID": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "4e6533f8-8580-48e6-85bb-c51d8d66a756", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2020-07-18 09:10:30.0", "addedByUserId": "p1943121765", "size": null } ] }

All Translation Projects

Sample Code

[ { "id": 1560, "name": "Cloud app in GitHub", "sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru" ], "domain": "", "isReviewMandatory": false, "isPostEditingMandatory": false,

SAP Translation HubDevelopment PUBLIC 127

Page 128: SAP Translation Hub

"enterpriseMltrId": null, "addedByUserId": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "4e6533f8-8580-48e6-85bb-c51d8d661288", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2018-07-28 09:10:30.0", "addedByUserId": "p1943121765", "size": null } ] }, { "id": 1563, "name": "App for mining client", "sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru" ], "domain": "", "isReviewMandatory": true, "isPostEditingMandatory": true, "companyMltrId": null, "addedByUserId": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "SAP Git service", "repository": "miningapp", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "13b4fdb6-9f84-423a-ae51-4c09d2c47d8e", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2018-07-26 12:01:21.0", "addedByUserId": "p1943121765", "size": null } ] } ]

Sample Code

[ { "id": 1561, "name": "Cloud app in GitHub", "sourceLanguage": "en-US", "targetLanguages": [ "it-IT", "fr-FR", "ru-RU" ],

128 PUBLICSAP Translation Hub

Development

Page 129: SAP Translation Hub

"domain": "05", "isReviewMandatory": false, "isPostEditingMandatory": false, "enterpriseMltrId": null, "addedByUserId": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "WEB", "repository": "https://github.com/arktrans/WebGitTranslation.git", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "4e6533f8-8580-48e6-85bb-c51d8d66a723", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2020-07-18 09:10:30.0", "addedByUserId": "p1943121765", "size": null } ] }, { "id": 1564, "name": "App for mining client", "sourceLanguage": "en-US", "targetLanguages": [ "it-IT", "fr-FR", "ru-RU" ], "domain": "05", "isReviewMandatory": true, "isPostEditingMandatory": true, "companyMltrId": null, "addedByUserId": "p1943121765", "createdByUserName": "Matthew Zhao", "escapeNonAscii": false, "importExistingTranslations": false, "gitType": "SAP Git service", "repository": "miningapp", "branch": "master", "fileType": "PROPERTIES", "files": [ { "id": "13b4fdb6-9f84-423a-ae51-4c09d2c23d4e", "pathToFile": "i18n/i18n.properties", "pathToGenerateTranslations": null, "addedAt": "2020-07-18 12:01:21.0", "addedByUserId": "p1943121765", "size": null } ] } ]

ErrorsIf the URL of the project is incorrect, the following error message will be displayed:

Sample Code

{ "error": { "code": 1013,

SAP Translation HubDevelopment PUBLIC 129

Page 130: SAP Translation Hub

"message": There is no Git project with ID {id}. Please check the URL and try again. }}

Update a Git Translation Project

Access

URL <base URL>/v2/gitProjects/<translation project ID>

HTTP method PUT

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

name The name for the translation project, for example, Texts in Web Git project for sales demo.

Required

sourceLanguage The ISO code of the source language, compliant with Best Current Practice (BCP) 47.

Required

targetLanguages The ISO code of the languages in which you want to translate texts. The language codes must be compliant with BCP 47.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Required

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains. For more information, see Domains.

NoteIt is not possible to enter multiple domains.

Optional

130 PUBLICSAP Translation Hub

Development

Page 131: SAP Translation Hub

Key Description Type

isReviewMandatory Determines whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Optional

isPostEditingMandatory Determines whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step on the translation project UI. You use these steps and the corre­sponding lifecycle statuses for each text to manage the post-editing and review process. If you enable this option, set the value of the isReviewMandatory key to true, too. For more in­formation, see Managing Post-Editing and Review Steps.

Optional

companyMLTRId Shows which company MLTR you want to use as a transla­tion provider.

TipTo get the ID of a company MLTR, see the address bar of the UI for company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

Optional

escapeNonAscii Determines whether you want machine-readable texts in the translated file. The file will contain Unicode escape sequen­ces for non-ASCII characters ( \uxxxx).

NoteThis option is required only if you want to translate a Java .properties files with ISO-8859-1 encoding and you need to interpret the content.

Optional

SAP Translation HubDevelopment PUBLIC 131

Page 132: SAP Translation Hub

Key Description Type

importExistingTranslations If you already translated the texts in your .properties file, for example, using a different translation provider to SAP Translation Hub, your application already contains transla­tions in language-specific .properties files. You use the Keep Translations option to determine how SAP Translation Hub handles these existing translations:

● If you want to keep the existing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application, choose Yes.

NoteWhen you use SAP Translation Hub to translate the texts in your .properties file, SAP Translation Hub stores the translations. If you use SAP Transla­tion Hub to translate your .properties file a sec­ond or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous translation of the .properties file.

If you change any translations directly in the lan­guage-specific .properties files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ignores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Trans­lation Hub.

● If you want SAP Translation Hub to translate all the texts in your .properties file from scratch, and therefore overwrite any existing translations in your .properties files, choose No.

Optional

gitType The source of the Git repository where the files that you want to translate are stored. The permitted entries are SAP Git service, hosted on the Web, and hosted by Enterprise. For more information about the different Git repositories, see Git Repositories [page 217].

Optional

132 PUBLICSAP Translation Hub

Development

Page 133: SAP Translation Hub

Key Description Type

branch The name of the Git branch.

Examplemaster

Optional

fileType The type of file that you want to translate. The permitted en­tries are ABAPXLIFF, ANDROID_XML, HDBTEXTBUNDLE, INIXLIFF, IOSSTRINGS, IOSXLIFF, JSON, PROPERTIES, SBSXLIFF, and XLIFF. For more informa­tion about the file types, see Supported File Formats [page 211].

NoteFileType can be set at project creation time only. Setting it at a later time is not possible. If you do not enter a File­Type, the API assumes that the file is a .properties file (PROPERTIES).

Optional

files The files key comprises an array for files that you want to translate.

For each file, there is a pathToFile key. The value of the key is the path in your Git repository to the file that contains the source texts to be translated.

Examplei18n/i18n.properties

For details, see the table for the files key below.

Required

credentials The credentials key comprises a set of keys that provide user log-on information for the Git repository. For details, see the table for the credentials key below.

NoteYou can specify the credentials when you create a trans­lation project or when you execute the translation project.

NoteWhen the credentials are not provided (credentials : null), credentials attribute is not displayed.

Optional

SAP Translation HubDevelopment PUBLIC 133

Page 134: SAP Translation Hub

Key Description Type

repository Server Type: SAP Git Service

Description: Application names need to follow certain patterns: The first char­acter needs to be a lowercase letter. The subsequent characters can be low­ercase letters or numbers.

Server Type: Web / Enterprise

Description: There is a regular expres­sion check done by the system to check if the Git URL is valid.

NoteIf the system finds an error in the application name or the Git URL, the user will get an error.

If the Git URL is empty or invalid, the system throws an error and dis­plays the message "Please enter a valid Git URL. Valid Git URLs start with https:// or http://."

If the application name is empty, the system throws an error and dis­plays the message "The application name cannot be empty."

If the application name is invalid, the system throws an error and dis­plays the message "The application name is invalid. Application names have to follow certain rules. Start with a lowercase letter; after that, you can use lowercase letters or numbers."

Required

Credentials Key Description Type

user The ID of the user that accesses the Git repository. Optional

email The e-mail address of the user that accesses the Git reposi­tory.

Optional

password The password of the user that accesses the Git repository. Optional

Request Example

<base URL>/v2/gitProjects/1560

{ "name": "Cloud app in GitHub",

134 PUBLICSAP Translation Hub

Development

Page 135: SAP Translation Hub

"sourceLanguage": "en", "targetLanguages": [ "it", "fr", "ru", "da", "pt", "bg" ], "files": [ { "pathToFile": "webapp/i18n/i18n.properties" } ] }

<base URL>/v2/gitProjects/1561

{ "name": "Cloud app in GitHub", "sourceLanguage": "en-US", "targetLanguages": [ "it-IT", "fr-FR", "ru-RU", "da-DK", "pt-BR", "bg-BG" ], "files": [ { "pathToFile": "webapp/i18n/i18n.properties" } ] }

ResponseThe response message shows whether the update was successful. To confirm the updates, call the API as described under Get Details of Git Translation Projects.

Start the Execution (Translation) of Translation Projects

Access

URL <base URL>/v2/gitProjects/<translation project ID>/files/<file ID>/executions

HTTP method POST

To get the ID of a file in a translation project, see the files key in the response for Get Details of Git Translation Projects.

TipTo start the execution of all files in a Git repository connected to a translation project, call the API without /files/<file ID> in the URL. If you call the API for all files, the response comprises an array of executions for all files in the translation project.

SAP Translation HubDevelopment PUBLIC 135

Page 136: SAP Translation Hub

Request

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

operation The workflow operation that you want to executed.

ExamplePULL_TRANSLATE_PUSH, PULL_TRANSLATE, TRANSLATE_PUSH

Required

Request Body Example

{ "operation": "PULL_TRANSLATE_PUSH" }

Response

The translation response is in JSON format. The response contains the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

operation The workflow operation that was executed. Always in response

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

createdBy The name of the user who started the translation project ex­ecution.

Always in response

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

136 PUBLICSAP Translation Hub

Development

Page 137: SAP Translation Hub

Key Description Part of Response?

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a translation project is divided up among the files in the translation project. For each file, there is a childExecutions key that can in turn contain one or more childExecutions keys. Each childExecutions key comprises an array of the same keys as the main execution.

Always in response

Log Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

code The code of the log entry. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Execution for a Single File in a Translation Project

Sample Code

{ "id": "e614e016-fc49-4f1c-a7c0-fce33ffc727a", "projectId": 1560, "operation": null, "status": "CREATED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.063", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "93ed7e66-613a-4858-ba55-f692f06bf501", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "CREATED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0",

SAP Translation HubDevelopment PUBLIC 137

Page 138: SAP Translation Hub

"code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] }

Execution for all Files in a Translation Project

Sample Code

{ "id": "e614e016-fc49-4f1c-a7c0-fce33ffc727a", "projectId": 1560, "operation": null, "status": "CREATED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.063", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "93ed7e66-613a-4858-ba55-f692f06bf501", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "CREATED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": null, "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null }, { "id": "7d30aa4a-5002-42a2-ab49-3095d00d2a3c", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "CREATED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": null, "cancelled": false,

138 PUBLICSAP Translation Hub

Development

Page 139: SAP Translation Hub

"errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] }

Get Information About the Execution (Translation) Progress

Access

URL <base URL>/v2/gitProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method GET

TipIf you want to get information about all executions of a translation project, call the API without the ID of a translation project execution. If you call the API for all translation project executions, the response comprises an array of the translation project executions.

Request

Call the API without any parameters.

Request Example

● Single execution of a translation project: <base URL>/v2/gitProjects/1560/executions/e614e016-fc49-4f1c-a7c0-fce33ffc727a

● All executions of a translation project: <base URL>/v2/gitProjects/1560/executions

Response

The translation response is in JSON format. The response contains an array of keys with the following key-value pairs:

Key Description Part of Response?

id The ID of a single execution of a translation project. Always in response

projectId The ID of the translation project. Always in response

operation The workflow operation that was executed. Always in response

SAP Translation HubDevelopment PUBLIC 139

Page 140: SAP Translation Hub

Key Description Part of Response?

status The status of the translation project execution. The following statuses are available: Created, Executing, Completed.

Always in response

percentDone The progress of the translation project execution, expressed as a percentage.

Always in response

addedAt The date in UTC when the execution of the translation project was started.

Always in response

finishedAt The date in UTC when the execution of the translation project finished.

Always in response

cancelled Shows whether the execution of the translation project was cancelled.

Always in response

errors Shows whether the execution of the translation project con­tains errors. The available values are: True and False.

Always in response

warnings Shows whether the execution of the translation project con­tains warnings.

Always in response

log Contains an array of keys for different types of log entries, in­cluding warnings and errors. See the following table.

Always in response

childExecutions The execution of a translation project is divided up among the files in the translation project. For each file, there is a childExecutions key that can in turn contain one or more childExecutions keys. Each childExecutions key comprises an array of the same keys as the main execution.

Always in response

Log Key Description Part of Response?

type The type of the log entry, such as error. Always in response

createdAt The date in UTC when the log was created. Always in response

message The actual content of the log entry. Always in response

Response Body Example

Single Execution of a Translation Project

Sample Code

{ "id": "e614e016-fc49-4f1c-a7c0-fce33ffc727a", "projectId": 1560, "operation": null, "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:55.0", "cancelled": false, "errors": false, "warnings": null, "log": [ {

140 PUBLICSAP Translation Hub

Development

Page 141: SAP Translation Hub

"type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "7d30aa4a-5002-42a2-ab49-3095d00d2a3c", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:55.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:47.0", "code": "pushing-git", "message": "Pushing Changes to Git" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:46.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:40.0", "code": "translation-started", "message": "Translation started" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null }, { "id": "93ed7e66-613a-4858-ba55-f692f06bf501", "projectId": 1560,

SAP Translation HubDevelopment PUBLIC 141

Page 142: SAP Translation Hub

"operation": "PULL_TRANSLATE_PUSH", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:35.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:35.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:35.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:27.0", "code": "pushing-git", "message": "Pushing Changes to Git" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:25.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:22.0", "code": "percent-done", "message": "Done 0 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:21.0", "code": "translation-started", "message": "Translation started" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] }

All Executions of a Translation Project

Sample Code

[ { "id": "e614e016-fc49-4f1c-a7c0-fce33ffc727a", "projectId": 1560,

142 PUBLICSAP Translation Hub

Development

Page 143: SAP Translation Hub

"operation": null, "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:55.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": [ { "id": "7d30aa4a-5002-42a2-ab49-3095d00d2a3c", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:55.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:55.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:47.0", "code": "pushing-git", "message": "Pushing Changes to Git" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:46.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:40.0", "code": "translation-started", "message": "Translation started" }, {

SAP Translation HubDevelopment PUBLIC 143

Page 144: SAP Translation Hub

"type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null }, { "id": "93ed7e66-613a-4858-ba55-f692f06bf501", "projectId": 1560, "operation": "PULL_TRANSLATE_PUSH", "status": "COMPLETED", "percentDone": 100, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:46:11.0", "finishedAt": "2018-07-30 16:46:35.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:46:35.0", "code": "completed", "message": "Execution was completed" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:35.0", "code": "percent-done", "message": "Done 100 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:27.0", "code": "pushing-git", "message": "Pushing Changes to Git" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:25.0", "code": "translation-finished", "message": "Translation was finished" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:22.0", "code": "percent-done", "message": "Done 0 percent" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:21.0", "code": "translation-started", "message": "Translation started" }, { "type": "INFO", "createdAt": "2018-07-30 16:46:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null } ] },

144 PUBLICSAP Translation Hub

Development

Page 145: SAP Translation Hub

{ "id": "e614e016-fc49-4f1c-a7c0-fce33ffc727a", "projectId": 1560, "operation": null, "status": "COMPLETED", "percentDone": 0, "createdBy": "p1943121765", "addedAt": "2018-07-30 16:36:11.0", "finishedAt": "2018-07-30 16:36:55.0", "cancelled": false, "errors": false, "warnings": null, "log": [ { "type": "INFO", "createdAt": "2018-07-30 16:36:11.0", "code": "execution-queued", "message": "Execution was queued" } ], "childExecutions": null, "credentials": null } ]

Get Translations in the Response

Access

URL <base URL>/v2/gitProjects/<translation project ID>/files/<file ID >/translations

HTTP method GET

To get the ID of a file in a translation project, see the files key in the response for Get Details of Git Translation Projects.

TipIf you want to get the translations for all files in a translation project, call the API without /files/<file ID> in the URL.

Request

You can call the API without any parameters. If you want to get translations in only one language, you can use the following query parameter at the end of the URL:

Key Description Type

language If you want to retrieve the translations in only one language, specify the required language code.

Optional

Request Example

SAP Translation HubDevelopment PUBLIC 145

Page 146: SAP Translation Hub

● Get the translations for a single file: <base URL>/v2/gitProjects/1560/files/4e6533f8-8580-48e6-85bb-c51d8d661288/translations?language=fr or ?language=fr-FR

● Get the translations for all files in a translation project: <base URL>/v2/fileProjects/1560/translations?language=fr or ?language=fr-FR

Response

Key Description Part of Response?

key The unique key of a translation unit. Always in response

displayedKey A readable key of a translation unit; the key is not necessarily unique.

Always in response

translatedText The translated text. Always in response

sourceText The source text that was translated. Always in response

textType An SAP-compliant text type code.

ExampleField labels have the code XFLD.

Always in response

dataType The data type of the translation.

ExamplePlain text.

Always in response

contextNote Additional context information that helps human translators or subject matter experts to find the most fitting translation.

ExampleThe text appears in the details section of the screen in a list of product metadata.

Always in response

sourceLanguage The ISO code of the language of the source text - compliant with Best Current Practice (BCP) 47.

Always in response

targetLanguage The ISO code of the translation - compliant with BCP 47. Always in response

maxWidth The maximum number of characters that the translation should have.

Always in response

changedBy The name of the translator who last edited the translation. Always in response

changedAt The date in UTC when the translation was last updated. Always in response

translationProvider The translation provider for the translation.

ExampleMultilingual text repository (MLTR).

Always in response

146 PUBLICSAP Translation Hub

Development

Page 147: SAP Translation Hub

Key Description Part of Response?

status The lifecycle status of the translation.

ExampleIN_REVIEW, TRANSLATED.

Always in response

qIndex The quality rating of the translation. The higher the number on a scale from 0-100, the better the quality. For more infor­mation, see Quality Index.

Always in response

Sample Code

[ { "key": "xbut.addToCart", "displayedKey": "xbut.addToCart", "value": "Ajouter au panier", "sourceValue": "Add to Cart", "textType": "XBUT", "dataType": "PLAINTEXT", "contextNote": "Button on screen for product details", "sourceLanguage": "en", "targetLanguage": "fr", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T06:20:30.003Z", "source": "MLTR", "status": "TRANSLATED", "fileId": "4e6533f8-8580-48e6-85bb-c51d8d661288", "qIndex": 86 }, { "key": "xbut.sort", "displayedKey": "xbut.sort", "value": "Trier", "sourceValue": "Sort", "textType": "XBUT", "dataType": "PLAINTEXT", "contextNote": "Button next to column header", "sourceLanguage": "en", "targetLanguage": "fr", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T06:20:30.023Z", "source": "MLTR", "status": "TRANSLATED", "fileId": "4e6533f8-8580-48e6-85bb-c51d8d661288", "qIndex": 92 } ]

Sample Code

[ { "key": "xbut.addToCart", "displayedKey": "xbut.addToCart", "value": "Ajouter au panier", "sourceValue": "Add to Cart", "textType": "XBUT",

SAP Translation HubDevelopment PUBLIC 147

Page 148: SAP Translation Hub

"dataType": "PLAINTEXT", "contextNote": "Button on screen for product details", "sourceLanguage": "en-US", "targetLanguage": "fr-FR", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T06:20:30.003Z", "source": "MLTR", "status": "TRANSLATED", "fileId": "4e6533f8-8580-48e6-85bb-c51d8d661288", "qIndex": 86 }, { "key": "xbut.sort", "displayedKey": "xbut.sort", "value": "Trier", "sourceValue": "Sort", "textType": "XBUT", "dataType": "PLAINTEXT", "contextNote": "Button next to column header", "sourceLanguage": "en-US", "targetLanguage": "fr-FR", "maxWidth": null, "changedBy": "", "changedAt": "2018-07-30T06:20:30.023Z", "source": "MLTR", "status": "TRANSLATED", "fileId": "4e6533f8-8580-48e6-85bb-c51d8d661288", "qIndex": 92 } ]

Update and Review Translations

Access

URL <base URL>/v2/gitProjects/<translation project ID>/files/<file ID>/translations

HTTP method PUT

Request

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The following table shows the key-value pairs in the JSON request.

NoteTo better understand the keys, see the sample code for the request body below the table.

Key Description Type

key The unique key of a translation unit. Required

148 PUBLICSAP Translation Hub

Development

Page 149: SAP Translation Hub

Key Description Type

displayedKey A readable key of a translation unit; the key is not necessarily unique.

Optional

translatedText The new translation that you want to save. Required

sourceText The source text that was translated. Required

sourceLanguage The ISO code of the language of the source text - compliant with Best Current Practice (BCP) 47.

Optional

targetLanguage The ISO code of the translation that you want to update - compliant with BCP 47.

Required

status The new lifecycle status that you want to set for the transla­tion.

The possible values are as follows: INITIAL, IN_POST_EDITING, IN_REVIEW, REVIEWED, TRANSLATED, NOT_APPLICABLE.

Optional

Request Example

<base URL>/v2/fileProjects/1560/files/4e6533f8-8580-48e6-85bb-c51d8d661288/translations

[ { "key": "xfld.addToCart", "value": "Ajouter au Panier", "sourceValue": "Shopping Cart", "targetLanguage": "fr" } ]

<base URL>/v2/fileProjects/1561/files/4e6533f8-8580-48e6-85bb-c51d8d661288/translations

[ { "key": "xfld.addToCart", "value": "Ajouter au Panier", "sourceValue": "Shopping Cart", "targetLanguage": "fr-FR" } ]

ResponseThe response message shows whether the update was successful. To confirm the update, call the API as described under Get Translations in the Response.

SAP Translation HubDevelopment PUBLIC 149

Page 150: SAP Translation Hub

Cancel a Specific Execution of a Git Translation Project

Access

URL <base URL>/v2/gitProjects/<translation project ID>/executions/<ID of translation project execution>

HTTP method DELETE

Request

Call the API without any parameters.

Request Example

<base URL>/v2/gitProjects/1560/executions/93ed7e66-613a-4858-ba55-f692f06bf501

Response

The response message shows whether the cancellation was successful. To confirm that the specific execution of the translation project was cancelled, call the API as described under Get Information About the Execution (Translation) Progress.

Delete a File in a Git Translation Project

Access

URL <base URL>/v2/gitProjects/<translation project ID>/files/<file ID>

HTTP method DELETE

To get the ID of a file in a translation project, see the files key in the response for Get Details of Git Translation Projects.

Request

Call the API as described in the Access section.

Request Example

<base URL>/v2/gitProjects/1560/files/6pwjYksbweOfKRWx-fM3kIqDuMkMYoW-1vWd_6kYsBc

Response

The response message shows whether the deletion was successful. To confirm that the file was deleted, call the API as described under Get Details of Git Translation Projects.

150 PUBLICSAP Translation Hub

Development

Page 151: SAP Translation Hub

Delete a Git Translation Project

Access

URL <base URL>/v2/gitProjects/<translation project ID>

HTTP method DELETE

RequestCall the API with only the ID of the translation project at the end of the URL.

Request Example

<base URL>/v2/gitProjects/1560

ResponseThe response message shows whether the deletion was successful. To confirm that the translation project was deleted, call the API as described under Get Details of Git Translation Projects.

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Building the Base URL of SAP Translation Hub [page 51]Domains [page 13]languages Method [page 54]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]Generating CSRF tokens for public APIs [page 192]

8.5 suggestions Method

This method enables you to get suggestions for short texts during the development process.

Usage

Provides suggestions for short texts based on complete or partial texts and their translations. You can, for example, use the suggestions method to propose texts while you type in a development environment. The texts that the method proposes are already available in additional languages in the SAP multilingual text repository (SAP MLTR).

SAP Translation HubDevelopment PUBLIC 151

Page 152: SAP Translation Hub

Request

Access

URL <base URL>/v1/suggestions

HTTP method GET

Authorization Basic authentication (user and password for SAP Business Technology Platform)

Request Parameters

You can use the following parameters by adding them to the URL:

NoteIf you want to use multiple parameters, prefix each parameter name with an ampersand (&). If you want to enter multiple parameter values for a given parameter, enter a comma between each parameter value.

Parameter Description Type

search Enables you to search for a text in SAP Translation Hub.

For example: <base URL>/v1/suggestions?search=<text>. If you want to enter a text in a language other than English, enter the text in the required language here, and specify the language in the searchLanguage pa­rameter.

NoteYou can enter a complete text or part of a text.

Required

searchLanguage The language of the text that you search for in SAP Transla­tion Hub. This parameter enables you to search for a text in any of the languages that SAP Translation Hub supports. Specify the language using the language code, such as de for German.

Optional

language The target languages in which a text exists.

ExampleFor a particular development project, you need transla­tions in German and French. You search for texts that have translations in German (de) and French (fr).

Optional

domain The ID of a translation domain - such as B2 for Customer Re­lationship Management - or the ID of a domain group - such as (02 for sales.

152 PUBLICSAP Translation Hub

Development

Page 153: SAP Translation Hub

Parameter Description Type

texttype The ID of a text type to which texts are assigned.

ExampleTo ensure that form and capitalization of texts are as ac­curate as possible for a particular scenario, such as a UI element, you can search for texts that are assigned to the text type for field labels (XFLD).

NoteIf you use the suggestions method with ABAP sys­tems, you can specify a four-character object type, such as DTEL for data elements.

Optional

maxLength The maximum number of characters that the text can have.

ExampleIf a UI element can accommodate only 5 characters, you can search for texts that comprise 5 characters or fewer. If the suggestions method does not find any texts that match the length criteria, the response is empty.

Optional

Request Body Example

Searches for texts in the specified domain(s) or domain group(s).Assume you want to search for entries that contain the English word User Settings. More specifically, you want instances of this text that are used in field labels (XFLD) within the CRM (B2) domain, and that have translations in French and German. To find such texts, enter the following:<base URL>/v1/suggestions?search=User Settings&texttype=XFLD&domain=B2&language=de,fr

<base URL>/v1/suggestions?search=User Settings&texttype=XFLD&domain=B2&language=de-DE,fr-FR

NoteFor examples that include other parameters, see suggestions Method - More Code Examples.

Response

The response of the suggestions method has a JSON root object. The response contains the following key-value pairs:

SAP Translation HubDevelopment PUBLIC 153

Page 154: SAP Translation Hub

Parameter Description Part of Response?

id A key that uniquely identifies the text's entry in the data­base.

Always in response

value The text that the suggestions method looks for in the SAP MLTR, based on the text that you enter in the search pa­rameter in the request.

NoteIf you want to search for cancel by entering part of that word, for example, canc, in the request, the value param­eter in the response contains the full text, cancel.

Always in response

domainId The ID of the domain assigned to the translations of the text entered in the request.

NoteIf you specify the ID of a domain group in the request, the response always contains the ID of an individual do­main.

Depends on request

domainName The name of the domain assigned to the translations of the text entered in the request.

NoteIf you specify the ID of a domain group in the request, the response always contains the name of an individual domain.

Depends on request

texttypeId The ID of the text type assigned to the text entered in the re­quest.

NoteIf you use the suggestions method with ABAP sys­tems and the method returns an object type instead of a text type, this parameter shows the four-character ID of the object type.

Depends on request

texttypeName The name of the text type assigned to the text entered in the request.

NoteIf you use the suggestions method with ABAP sys­tems and the method returns an object type instead of a text type, this parameter shows the name of the object type.

Depends on request

154 PUBLICSAP Translation Hub

Development

Page 155: SAP Translation Hub

Parameter Description Part of Response?

englishValue ● If you search for a text in English, the content of this pa­rameter is the same as the value parameter.

● If you search for a text in a language other than English, this parameter contains the English translation of the text in the value parameter.

The English translation of the text - in English - entered in the request.

Always in response

availableLanguages The total number of languages, including English, in which there are translations of the requested text in SAP Transla­tion Hub.

Always in response

availableFilteredLanguages If you use the language parameter in the request, this pa­rameter shows the number of languages in that parameter in which translations of the text was found. For example, if you specify French (FR) and German (DE) in the language pa­rameter of the request, but there are translations of the re­quested text only in French, the value of this key is 1. If there are translations in both French and German, the value of this key is 2.

Depends on request

textSpace The length specifications of the text entered in the request. textSpace comprises multiple parameters – see next table.

NoteThis parameter is supported only for texts that you search for in English or German. This means the searchLanguage parameter is English or German, or you do not enter the searchLanguage parameter in the re­quest.

Depends on request

textSpace Parameter Description Part of Response?

inputChars The number of characters contained in the text entered in the request.

Always in response

minRecChars The minimum recommended number of characters to set aside in the UI to accommodate a potential length increase in translations.

Always in response

minRecEm The minimum recommended length to set aside in the UI to accommodate a potential length increase in translations. It is measured in em.

Always in response

Response Body Example

Sample Code

{ "suggestions": [ { "id": 6260958, "value": "User Settings", "domainID": "B2", "domainName": "Customer Relationship Management",

SAP Translation HubDevelopment PUBLIC 155

Page 156: SAP Translation Hub

"texttypeId": "XFLD", "texttypeName": "Label", "englishValue": "User Settings", "availableLanguages": 30, "availableFilteredLanguages": "2", "textSpace": { "inputChars": 13, "minRecEm": 17, "minRecChars": 26 } }, { "id": 1277788, "value": "User Session Settings", "domainID": "B2", "domainName": "Customer Relationship Management", "texttypeId": "XFLD", "texttypeName": "Label", "englishValue": "User Session Settings", "availableLanguages": 30, "availableFilteredLanguages": "2", "textSpace": { "inputChars": 21, "minRecEm": 21, "minRecChars": 32 } } ] }

Related Information

suggestions Method: More Code Examples [page 156]Supported Languages [page 23]

8.5.1 suggestions Method: More Code Examples

To better understand the individual parameters that you can use with the suggestions method, see the examples in this document.

Searching for Texts in a Language Other Than English

Request Body Example

Assume you want to search for entries that contain the German word Auftrag anlegen and have the following attributes:

● Used in button texts (XBUT)● Assigned to the Basis (BC) domain

156 PUBLICSAP Translation Hub

Development

Page 157: SAP Translation Hub

● Have translations in Polish (pl, pl-PL) and Russian (ru, ru-RU)

To find such texts, use the following request:

<base URL> /v1/suggestions?search=Auftrag anlegen&texttype=XBUT&domain=BC&language=pl,ru&searchLanguage=de

<base URL> /v1/suggestions?search=Auftrag anlegen&texttype=XBUT&domain=BC&language=pl-PL,ru-RU&searchLanguage=de-DE

Response Body Example

Sample Code

{ "suggestions" : [ { "id": 1824658, "value": "Ad-hoc-Auftrag anlegen", "domainId": "BC", "domainName": "Basis", "texttypeId": "XBUT", "texttypeName": "Button text", "englishValue": "Create Ad-Hoc Request", "availableLanguages": 36, "availableFilteredLanguages": 2, "textSpace": { "inputChars": 22, "minRecEm": 22, "minRecChars": 33 } } ] }

Searching for Texts up to a Specific Length

Request Body Example

Assume you want to search for entries that contain the French word envoyer and have the following attributes:

● Used in button texts (XBUT)● Assigned to the Logistics - General (LO) domain● Have translations in simplified Chinese (zh, zh-CN) and Japanese (ja, ja-JP)● Contain no more than 10 characters

To find such texts, use the following request:

<base URL>/v1/suggestions?search=envoyer&texttype=XBUT&domain=lo&language=zh,ja&searchLanguage=fr&maxLength=10

<base URL> /v1/suggestions?search=envoyer&texttype=XBUT&domain=lo&language=zh-CN,ja-JP&searchLanguage=fr-FR&maxLength=10

SAP Translation HubDevelopment PUBLIC 157

Page 158: SAP Translation Hub

Response Body Example

{ "suggestions" : [ { "id": 1119658, "value": "Envoyer", "domainId": "LO", "domainName": "Logistics - General", "texttypeId": "XBUT", "texttypeName": "Button text", "englishValue": "Submit", "availableLanguages": 39, "availableFilteredLanguages": 2 } ] }

NoteTo see the impact of using the maxLength parameter, try changing the value to 30, for example.

Searching for Texts in an ABAP Object Type

Request Body ExampleAssume you want to search for entries that contain the English word summary and have the following attributes:

● Used in data element texts (DTEL) in ABAP systems● Assigned to the Basis (BC) domain● Have translations in Italian (it, it-IT) and Spanish (es, es-ES)

To find such texts, use the following request:

<base URL>/v1/suggestions?search=summary&texttype=DTEL&domain=lo&language=it,es<base URL> /v1/suggestions?search=summary&texttype=DTEL&domain=lo&language=it-IT,es-ES

Response Body Example

{ "suggestions": [ { "id": 0, "value": "Summary", "domainId": "BC", "domainName": "Basis", "texttypeId": "DTEL", "texttypeName": "Data Elements", "englishValue": "Summary", "availableLanguages": 39, "availableFilteredLanguages": 2, "textSpace": { "inputChars": 7, "minRecEm": 12, "minRecChars": 18 }

158 PUBLICSAP Translation Hub

Development

Page 159: SAP Translation Hub

}, { "id": 0, "value": "Feed Summary", "domainId": "BC", "domainName": "Basis", "texttypeId": "DTEL", "texttypeName": "Data Elements", "englishValue": "Feed Summary", "availableLanguages": 39, "availableFilteredLanguages": 2, "textSpace": { "inputChars": 12, "minRecEm": 16, "minRecChars": 24 } } ]} }

Searching for Texts in a Domain Group

Request Body ExampleAssume you want to search for entries that contain the English word print and have the following attributes:

● Used in message long texts (YMSG)● Assigned to the Technology (07) domain group

To find such texts, use the following request:

<base URL> /v1/suggestions?search=print&texttype=YMSG&domain=07

Response Body Example

{ "suggestions": [ { "id": 0, "value": "Close print preview mode", "domainId": "MD", "domainName": "Master Data Management", "texttypeId": "YMSG", "texttypeName": "Message text (long)", "englishValue": "Close print preview mode", "availableLanguages": 22, "textSpace": { "inputChars": 24, "minRecEm": 24, "minRecChars": 36 } }, { "id": 0, "value": "Could not set image print size", "domainId": "MD", "domainName": "Master Data Management", "texttypeId": "YMSG", "texttypeName": "Message text (long)", "englishValue": "Could not set image print size", "availableLanguages": 22,

SAP Translation HubDevelopment PUBLIC 159

Page 160: SAP Translation Hub

"textSpace": { "inputChars": 30, "minRecEm": 30, "minRecChars": 45 } } ] }

8.6 texttypes Method

This method enables you to access the text types that are available in SAP Translation Hub.

Usage

Short texts, for example, those used on user interfaces (UIs), in SAP products are characterized by various text types. The type of a specific text is determined by the UI element that it describes. For example, button texts are described by the text type XBUT.

The texttypes method returns a list of the text types that are available in SAP Translation Hub. You can combine the texttypes method with the suggestions method to narrow down the results of the suggestions method.

Request

Access

URL <base URL>/v1/texttypes

HTTP method GET

Authorization Basic authentication (user and password for SAP Business Technology Platform)

Request Parameters

160 PUBLICSAP Translation Hub

Development

Page 161: SAP Translation Hub

To check whether a specific text type is available, you can add the following parameter to the URL:

Parameter Description Type

search Enables you to see whether a particular text type is available in SAP Translation Hub. For example: <base URL>/v1/texttypes?search=<text type name>

NoteYou can enter all or part of the name of the text type, for example, message.

Optional

Request Body Example

<base URL>/v1/texttypes?search=message

Response

The result is a JSON object, and contains the following key-value pairs:

Key Description Part of Response?

id The ID of a text type. Always in response

name The short description of a text type. Always in response

Response Body Example

Sample Code

{ "texttypes": [ { "id": "MSAG", "name": "Message Classes" }, { "id": "XMSG", "name": "Message text" } ] }

Related Information

Building the Base URL of SAP Translation Hub [page 51]

SAP Translation HubDevelopment PUBLIC 161

Page 162: SAP Translation Hub

8.7 translate Method

This method enables you to translate short texts into the languages that SAP Translation Hub supports.

Usage

Provides translations of short texts based on multiple translation providers. The method looks for suitable translations from translation providers in the following sequence:

1. Company multilingual text repository (company MLTR) - if available; see Integrating Your Own Language Data [page 29]

2. SAP multilingual text repository (SAP MLTR)3. SAP Machine Translation (SAP MT)

Request

Access

URL <base URL>/v1/translate

HTTP method POST

Authorization Basic authentication (user and password for SAP Business Technology Platform)

Request Parameters

The API requires a JSON request payload and the request content type: application/json; charset=utf-8. If you do not use this content type, the API call fails.

The JSON request contains an array of units JSON objects. The following tables show the different key-value pairs in the JSON request:

NoteTo better understand the keys of the JSON request shown in the following tables, see the sample code for the request body below the tables.

Root Key Description Type

targetLanguages The codes of the target languages in which you want the API to return translations of texts. To view the codes of the sup­ported languages, call the SAP Translation Hub languages method. If you do not specify any target languages, the API returns the texts in all available target languages.

Optional

162 PUBLICSAP Translation Hub

Development

Page 163: SAP Translation Hub

Root Key Description Type

sourceLanguage A source language other than English. You can enter the code of any of the languages that SAP Translation Hub sup­ports as a source language. If you do not use this parameter, the API assumes that the source language is English.

NoteTo see which combinations of source and target lan­guages are possible, see Supported Languages.

Optional

enableMT Determines whether SAP Translation Hub translates texts using SAP Machine Translation (SAP MT) in addition to the multilingual text repository (MLTR).

By default, SAP MT is active. If you want to deactivate it, en­ter false as the value of this parameter.

Optional

minQuality Enables restriction of translations based on Quality Index. This means that you can restrict outputs for which quality in­dex is below a given threshold value. This can be achieved with the MinQuality field in the translation API.

Optional

StatsOnly Enables simulation run in translate API. You can set the value of this field to True to enable simulation. In doing so, the translations are not updated, however only the metadata like Translation Providers and Quality Index is displayed. Note that the data provided in simulation is not considered for bill­ing. By default, the value in the StatsOnly field is False.

Optional

domain The ID of a translation domain (such as B2 for CRM) or the ID of a domain group (such as 02 for sales). If you do not specify a domain or domain group, the API searches for translations in all available domains.

NoteIt is not possible to enter multiple domains.

Optional

companyMLTRId The ID of a company MLTR. This parameter enables you to use a company MLTR as the translation provider.

TipTo get the ID of a company MLTR, see the number in pa­rentheses at the end of the URL on the UI for managing company MLTRs. For more information, see Access UIs for Integrating Your Own Language Data.

ExampleThe ID of the company MLTR in the following example is 31: https://cdia7d9108fa-aa956e39a.hana.ondemand.com/cdi-web/ui/#/ManageMltr/XliffMltrSet(31).

Optional

SAP Translation HubDevelopment PUBLIC 163

Page 164: SAP Translation Hub

Root Key Description Type

units A key that describes a single text that you want to translate. The units key comprises multiple keys - see the next table.

Required

Units Key Description Type

textType The ID of a text type, for example, XFLD for a field label.

NoteIt is not possible to enter multiple text types.

Optional

key A key that helps you to uniquely identify a particular text and its subsequent translations in the units key. SAP Translation Hub stores this key with the text in the API request to make it easier to identify specific texts and their translations than by using the texts alone. For example, if you specify a key for each text in a properties file that you want to translate, you can use the key to identify the translations for each text in the target properties files.

NoteThe key is stored only to make it easier to identify the text in the units key; it is not stored for future reference in the multilingual text repository.

Optional

value The text to be translated.

NoteTo see the request payload required to translate multiple texts, see translate Method: More Code Examples.

Required

maxLength The maximum number of characters that you want transla­tions to comprise.

NoteIf the API is not able to find translations of the required length for at least one target language, the request does not contain any translations.

Optional

164 PUBLICSAP Translation Hub

Development

Page 165: SAP Translation Hub

Units Key Description Type

searchData A key that allows you to specify the translation of a UI text in one of the requested target languages. You use this parame­ter if you know that there are multiple possible translations for a given source text, and you want to restrict the results to a specific translation.

ExampleLet's take the word Cancel. The German translation could be Abbrechen or Stornieren. If you know that the German translation in a given instance should be Abbre­chen, you can specify Abbrechen so that the API returns the correct translation in German (and in other lan­guages).

This parameter has two properties that are required: language (the language code provided by the languages method) and value (the text in the target language).

Optional

Request Body Example

Below is one piece of sample code that contains some of the possible keys in the payload. To see some more code examples that include other keys in the payload, see translate Method - More Code Examples.

Sample Code

{ "targetLanguages": [ "de", "fr", "ru" ], "domain": "B2", "units": [ { "textType": "XFLD", "key": "LOGIN_USERNAME_FIELD", "value": "User Name" } ] }

Sample Code

{ "targetLanguages": [ "de-DE", "fr-FR", "ru-RU" ], "domain": "B2", "units": [ { "textType": "XFLD",

SAP Translation HubDevelopment PUBLIC 165

Page 166: SAP Translation Hub

"key": "LOGIN_USERNAME_FIELD", "value": "User Name" } ] }

Response

The translation response is in JSON format. The response contains an array of units keys; each units key in the response corresponds to a units key in the request. If there is more than one units key, the sequence of these keys from the request is retained. The response contains the following key-value pairs:

Root Key Description Part of Response?

units Describes a single text that you want to translate and addi­tional context information. The units key comprises multiple keys - see the next table.

Always in response

Each units key in the response corresponds to a units key in the request, and contains the following keys:

Units Key Description Part of Response?

textType The ID of the text type, for example, XFLD. Depends on request

domain The ID of the translation domain that is assigned to the translation that the API provides, even if you specify a do­main group in the request.

NoteNot all translations are assigned a domain.

Depends on request and availability of domain assign­ment

key A key that uniquely identifies a text in the units key.

NoteThe key is stored only to make it easier to identify the text in the units key; it is not stored for future reference in the multilingual text repository (MLTR).

Depends on request

value The text to be translated. Always in response

translations A key that describes the translated text. The translations key comprises multiple keys - see the next table.

Always in response

For each target language that is specified in the targetLanguages key in the request, there is a set of translations keys in the response. If you specify a value for the searchData key in the request, the translation is based on the text in the value parameter that you specify in the request.

NoteIf a translation does not exist in one of the target languages specified in the request, the set of translations keys for that target language is not part of the response. If there are no translations of the text, the translations array is part of the response, but is empty.

166 PUBLICSAP Translation Hub

Development

Page 167: SAP Translation Hub

Translations Key Description Part of Response?

language The code of the target language in which the text is trans­lated.

Depends on request

value The translation of the text. Depends on request

translationProvider The source of the translated texts:

● 0 = SAP multilingual text repository (SAP MLTR)● 1 = SAP Machine Translation (SAP MT)● 5 = company MLTR

Always in response

qualityIndex The quality index helps you to judge the quality of transla­tions. The higher the number on a scale from 0-100, the bet­ter the quality. For more information, see Quality Index.

Depends on translation pro­vider and request:

● If an MLTR is the transla­tion provider, always in response

Response Body Example

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "B2", "key": "LOGIN_USERNAME_FIELD", "value": "User Name", "translations": [ { "language": "de", "value": "Benutzername", "translationProvider": 0, "qualityIndex": 92 }, { "language": "ru", "value": "Имя пользователя", "translationProvider": 0, "qualityIndex": 92 }, { "language": "fr", "value": "Nom de l'utilisateur", "translationProvider": 0, "qualityIndex": 77 } ] } ] }

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "B2", "key": "LOGIN_USERNAME_FIELD", "value": "User Name",

SAP Translation HubDevelopment PUBLIC 167

Page 168: SAP Translation Hub

"translations": [ { "language": "de-DE", "value": "Benutzername", "translationProvider": 0, "qualityIndex": 92 }, { "language": "ru-RU", "value": "Имя пользователя", "translationProvider": 0, "qualityIndex": 92 }, { "language": "fr-FR", "value": "Nom de l'utilisateur", "translationProvider": 0, "qualityIndex": 77 } ] } ] }

Related Information

Access UIs for Integrating Your Own Language Data [page 36]Building the Base URL of SAP Translation Hub [page 51]Integrating Your Own Language Data [page 29]languages Method [page 54]Supported Languages [page 23]Testing the API [page 188]translate Method: More Code Examples [page 169]Quality Index [page 16]

168 PUBLICSAP Translation Hub

Development

Page 169: SAP Translation Hub

8.7.1 translate Method: More Code Examples

To better understand the individual parameters that you can use with the translate method, see the examples in this document.

Translating a Text With a Minimum of Parameters

Assume that you want to translate the word purchase order into French and Italian. You just want a quick translation without any additional features. For example, you don't use the domain concept or differentiate between text types. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "fr", "it" ], "units": [ { "value": "Purchase Order" } ] }

Response Body Example

Sample Code

{ "units": [ { "domain": "MM", "value": "Purchase Order", "translations": [ { "language": "fr", "value": "Commande d'achat", "translationProvider": 0, "qualityIndex": 91 }, { "language": "it", "value": "Ordine d'acquisto", "translationProvider": 0, "qualityIndex": 91 } ] } ] }

SAP Translation HubDevelopment PUBLIC 169

Page 170: SAP Translation Hub

Translating Multiple Texts

Assume that you want to translate the words user name, password, and sales order into French, Italian, and Spanish. Based on the app in which your texts are used, you want the translations to meet the following requirements:

● Used in the text type for field labels (XFLD)● Assigned to the translation domain for CRM (B2)

To judge the quality of the translations, you also want to see a quality rating for the translations. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "fr", "it", "es" ], "domain": "B2", "units": [ { "textType": "XFLD", "key": "LOGIN_USERNAME_FIELD", "value": "User Name" }, { "textType": "XFLD", "key": "PWD_FIELD", "value": "Password" }, { "textType": "XFLD", "key": "SALES_ORDER_FIELD", "value": "Sales Order" } ] }

Response Body Example

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "B2", "key": "LOGIN_USERNAME_FIELD", "value": "User Name", "translations": [ { "language": "it", "value": "Nome utente", "translationProvider": 0, "qualityIndex": 94 },

170 PUBLICSAP Translation Hub

Development

Page 171: SAP Translation Hub

{ "language": "es", "value": "Usuario", "translationProvider": 0, "qualityIndex": 82 }, { "language": "fr", "value": "Nom de l'utilisateur", "translationProvider": 0, "qualityIndex": 77 } ] }, { "textType": "XFLD", "domain": "B2", "key": "PWD_FIELD", "value": "Password", "translations": [ { "language": "es", "value": "Clave de acceso", "translationProvider": 0, "qualityIndex": 84 }, { "language": "fr", "value": "Mot de passe", "translationProvider": 0, "qualityIndex": 96 }, { "language": "it", "value": "Password", "translationProvider": 0, "qualityIndex": 98 } ] }, { "textType": "XFLD", "domain": "B2", "key": "SALES_ORDER_FIELD", "value": "Sales Order", "translations": [ { "language": "es", "value": "Pedido cliente", "translationProvider": 0, "qualityIndex": 88 }, { "language": "it", "value": "Ordine cliente", "translationProvider": 0, "qualityIndex": 88 }, { "language": "fr", "value": "Commande client", "translationProvider": 0, "qualityIndex": 98 } ] } ]

SAP Translation HubDevelopment PUBLIC 171

Page 172: SAP Translation Hub

}

Specifying a Particular Translation

Assume that you want to translate the word cancel into Chinese, French, German, and Japanese. Your colleagues in the French subsidiary have already told you that the word cancel can be translated in several ways in French. In the app in question, the required translation of cancel is annuler. Furthermore, you want the translations to meet the following requirements:

● Used in the text type for field labels (XFLD)● Assigned to the translation domain group for sales (02)

To judge the quality of the translations, you also want to see a quality rating for the translations. You want to use only those translations that are in the MLTR, and don't want to use machine translation.

Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "de", "fr", "zh", "ja" ], "enableMT": false, "domain": "02", "units": [ { "textType": "XFLD", "key": "CANCEL", "value": "Cancel", "searchData": { "language": "fr", "value": "annuler" } } ] }

Response Body Example

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "HC", "key": "CANCEL", "value": "Cancel", "translations": [ {

172 PUBLICSAP Translation Hub

Development

Page 173: SAP Translation Hub

"language": "fr", "value": "annuler", "translationProvider": 0, "qualityIndex": 88 }, { "language": "de", "value": "stornieren", "translationProvider": 0, "qualityIndex": 75 }, { "language": "ja", "value": "中止", "translationProvider": 0, "qualityIndex": 77 }, { "language": "zh", "value": "取消", "translationProvider": 0, "qualityIndex": 98 } ] } ] }

Translating Texts from a Language Other Than English

Assume that you want to translate the German word Benutzerdaten into English, Chinese, and Japanese. If possible, you would like translations that are used in the area of CRM, (domain B2). To judge the quality of the translations, you would like to see a quality rating for the translations.

Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "en", "ja", "zh" ], "sourceLanguage": "de", "domain": "B2", "units": [ { "key": "USER_DATA", "value": "Benutzerdaten" } ] }

SAP Translation HubDevelopment PUBLIC 173

Page 174: SAP Translation Hub

Response Body Example

Sample Code

{ "units": [ { "domain": "B2", "key": "USER_FRIENDLY", "value": "Benutzerdaten", "translations": [ { "language": "zh", "value": "用户数据", "translationProvider": 0, "qualityIndex": 100 }, { "language": "en", "value": "User Data", "translationProvider": 0, "qualityIndex": 96 }, { "language": "ja", "value": "ユーザデータ", "translationProvider": 0, "qualityIndex": 100 } ] } ] }

Translating Texts with Reference to a Company MLTR

Assume that you have prepared a company MLTR (the ID of which is 325) that you would like to use as the first choice for translations in a particular project. For all other translations, you'd like to use the SAP MLTR and SAP MT within the area of CRM (domain B2).

Based on this requirement, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "de", "fr" ], "companyMltrId": 325, "domain": "B2", "resultLimit": 10, "units": [ { "value": "Cancel" },

174 PUBLICSAP Translation Hub

Development

Page 175: SAP Translation Hub

{ "value": "Add" }, { "value": "Username" } ] }

Response Body ExampleThe following response shows that the company MLTR has been used (the value of the translation provider is 5).

Sample Code

{ "units": [ { "value": "Cancel", "translations": [ { "language": "de", "value": "Stornieren", "translationProvider": 1, "qualityIndex": 32 }, { "language": "fr", "value": "Annular", "translationProvider": 1, "qualityIndex": 36 } ] }, { "domain": "B2", "value": "Add", "translations": [ { "language": "fr", "value": "Ajouter", "translationProvider": 0, "qualityIndex": 100 }, { "language": "de", "value": "Hinzufügen", "translationProvider": 0, "qualityIndex": 99 } ] }, { "domain": "BC", "value": "Username", "translations": [ { "language": "de", "value": "Benutzernamen", "translationProvider": 5, "qualityIndex": 100 }, { "language": "fr", "value": "Identifiant",

SAP Translation HubDevelopment PUBLIC 175

Page 176: SAP Translation Hub

"translationProvider": 0 } ] } ]}

Translating Texts with Minimum Quality Index

Assume you want translations with quality index above certain value. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": ["fr"],"enableMT": false,"minQuality": 50,"accountId":"qcad4wfqio","units": [{"key": "key1","value": "cancel","maxLength": 40,"searchData": {"language": "de","value": "Abbrechen"}},{"key": "key2","value": "apply","maxLength": 40}]}

Response Body Example

Sample Code { "units": [ { "domain": "CA", "key": "key1", "value": "cancel", "translations": [ { "language": "fr", "value": "Interrompre", "translationProvider": 0, "qualityIndex": 88 }

176 PUBLICSAP Translation Hub

Development

Page 177: SAP Translation Hub

] }, { "domain": "PO", "key": "key2", "value": "apply", "translations": [ { "language": "fr", "value": "appliquer", "translationProvider": 0, "qualityIndex": 71 } ]}

Translating Texts in Simulation Run

Assume you want to execute the translations in Simulation Run, i.e.,the translations are not updated, but only the metadata like, translation providers and quality index is displayed. Also the data provided is not considered for billing. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": ["fr"],"enableMT": false,"statsOnly" : true,"units": [{"key": "key1","value": "cancel","maxLength": 40,"searchData": {"language": "de","value": "Abbrechen"}},{"key": "key2","value": "apply","maxLength": 40}]}

Response Body Example

Sample Code

{ "units": [ { "domain": "CA",

SAP Translation HubDevelopment PUBLIC 177

Page 178: SAP Translation Hub

"key": "key1", "value": "cancel", "translations": [ { "language": "fr", "translationProvider": 0, "qualityIndex": 88 } ] }, { "domain": "PO", "key": "key2", "value": "apply", "translations": [ { "language": "fr", "translationProvider": 0, "qualityIndex": 71 } ] } ]}

8.7.2 translate Method BCP: More Code Examples

To better understand the individual parameters that you can use with the translate method, see the examples in this document.

Translating a Text With a Minimum of Parameters

Assume that you want to translate the word purchase order into French and Italian. You just want a quick translation without any additional features. For example, you don't use the domain concept or differentiate between text types. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "fr-FR", "it-IT" ], "units": [ { "value": "Purchase Order" } ] }

178 PUBLICSAP Translation Hub

Development

Page 179: SAP Translation Hub

Response Body Example

Sample Code

{ "units": [ { "domain": "MM", "value": "Purchase Order", "translations": [ { "language": "fr-FR", "value": "Commande d'achat", "translationProvider": 0, "qualityIndex": 91 }, { "language": "it-IT", "value": "Ordine d'acquisto", "translationProvider": 0, "qualityIndex": 91 } ] } ] }

Translating Multiple Texts

Assume that you want to translate the words user name, password, and sales order into French, Italian, and Spanish. Based on the app in which your texts are used, you want the translations to meet the following requirements:

● Used in the text type for field labels (XFLD)● Assigned to the translation domain for CRM (B2)

To judge the quality of the translations, you also want to see a quality rating for the translations. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "fr-FR", "it-IT", "es-ES" ], "domain": "B2", "units": [ { "textType": "XFLD", "key": "LOGIN_USERNAME_FIELD", "value": "User Name" }, {

SAP Translation HubDevelopment PUBLIC 179

Page 180: SAP Translation Hub

"textType": "XFLD", "key": "PWD_FIELD", "value": "Password" }, { "textType": "XFLD", "key": "SALES_ORDER_FIELD", "value": "Sales Order" } ] }

Response Body Example

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "B2", "key": "LOGIN_USERNAME_FIELD", "value": "User Name", "translations": [ { "language": "it-IT", "value": "Nome utente", "translationProvider": 0, "qualityIndex": 94 }, { "language": "es-ES", "value": "Usuario", "translationProvider": 0, "qualityIndex": 82 }, { "language": "fr-FR", "value": "Nom de l'utilisateur", "translationProvider": 0, "qualityIndex": 77 } ] }, { "textType": "XFLD", "domain": "B2", "key": "PWD_FIELD", "value": "Password", "translations": [ { "language": "es-ES", "value": "Clave de acceso", "translationProvider": 0, "qualityIndex": 84 }, { "language": "fr-FR", "value": "Mot de passe", "translationProvider": 0, "qualityIndex": 96 }, { "language": "it-IT", "value": "Password", "translationProvider": 0,

180 PUBLICSAP Translation Hub

Development

Page 181: SAP Translation Hub

"qualityIndex": 98 } ] }, { "textType": "XFLD", "domain": "B2", "key": "SALES_ORDER_FIELD", "value": "Sales Order", "translations": [ { "language": "es-ES", "value": "Pedido cliente", "translationProvider": 0, "qualityIndex": 88 }, { "language": "it-IT", "value": "Ordine cliente", "translationProvider": 0, "qualityIndex": 88 }, { "language": "fr-FR", "value": "Commande client", "translationProvider": 0, "qualityIndex": 98 } ] } ] }

Specifying a Particular Translation

Assume that you want to translate the word cancel into Chinese, French, German, and Japanese. Your colleagues in the French subsidiary have already told you that the word cancel can be translated in several ways in French. In the app in question, the required translation of cancel is annuler. Furthermore, you want the translations to meet the following requirements:

● Used in the text type for field labels (XFLD)● Assigned to the translation domain group for sales (02)

To judge the quality of the translations, you also want to see a quality rating for the translations. You want to use only those translations that are in the MLTR, and don't want to use machine translation.

Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "de-DE", "fr-FR", "zh-CN", "ja-JP" ],

SAP Translation HubDevelopment PUBLIC 181

Page 182: SAP Translation Hub

"enableMT": false, "domain": "02", "units": [ { "textType": "XFLD", "key": "CANCEL", "value": "Cancel", "searchData": { "language": "fr-FR", "value": "annuler" } } ] }

Response Body Example

Sample Code

{ "units": [ { "textType": "XFLD", "domain": "HC", "key": "CANCEL", "value": "Cancel", "translations": [ { "language": "fr-FR", "value": "annuler", "translationProvider": 0, "qualityIndex": 88 }, { "language": "de-DE", "value": "stornieren", "translationProvider": 0, "qualityIndex": 75 }, { "language": "ja-JP", "value": "中止", "translationProvider": 0, "qualityIndex": 77 }, { "language": "zh-CN", "value": "取消", "translationProvider": 0, "qualityIndex": 98 } ] } ] }

182 PUBLICSAP Translation Hub

Development

Page 183: SAP Translation Hub

Translating Texts from a Language Other Than English

Assume that you want to translate the German word Benutzerdaten into English, Chinese, and Japanese. If possible, you would like translations that are used in the area of CRM, (domain B2). To judge the quality of the translations, you would like to see a quality rating for the translations.

Based on these requirements, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "en-US", "ja-JP", "zh-CN" ], "sourceLanguage": "de-DE", "domain": "B2", "units": [ { "key": "USER_DATA", "value": "Benutzerdaten" } ] }

Response Body Example

Sample Code

{ "units": [ { "domain": "B2", "key": "USER_FRIENDLY", "value": "Benutzerdaten", "translations": [ { "language": "zh-CN", "value": "用户数据", "translationProvider": 0, "qualityIndex": 100 }, { "language": "en-US", "value": "User Data", "translationProvider": 0, "qualityIndex": 96 }, { "language": "ja-JP", "value": "ユーザデータ", "translationProvider": 0, "qualityIndex": 100 } ] } ]

SAP Translation HubDevelopment PUBLIC 183

Page 184: SAP Translation Hub

}

Translating Texts with Reference to a Company MLTR

Assume that you have prepared a company MLTR (the ID of which is 325) that you would like to use as the first choice for translations in a particular project. For all other translations, you'd like to use the SAP MLTR and SAP MT within the area of CRM (domain B2).

Based on this requirement, you use the following request payload:

Request Body Example

Sample Code

{ "targetLanguages": [ "de-DE", "fr-FR" ], "companyMltrId": 325, "domain": "B2", "resultLimit": 10, "units": [ { "value": "Cancel" }, { "value": "Add" }, { "value": "Username" } ] }

Response Body ExampleThe following response shows that the company MLTR has been used (the value of the translation provider is 5).

Sample Code

{ "units": [ { "value": "Cancel", "translations": [ { "language": "de-DE", "value": "Stornieren", "translationProvider": 1, "qualityIndex": 32 }, { "language": "fr-FR", "value": "Annular",

184 PUBLICSAP Translation Hub

Development

Page 185: SAP Translation Hub

"translationProvider": 1, "qualityIndex": 36 } ] }, { "domain": "B2", "value": "Add", "translations": [ { "language": "fr-FR", "value": "Ajouter", "translationProvider": 0, "qualityIndex": 100 }, { "language": "de-DE", "value": "Hinzufügen", "translationProvider": 0, "qualityIndex": 99 } ] }, { "domain": "BC", "value": "Username", "translations": [ { "language": "de-DE", "value": "Benutzernamen", "translationProvider": 5, "qualityIndex": 100 }, { "language": "fr-FR", "value": "Identifiant", "translationProvider": 0 } ] } ]}

Translating Texts with Minimum Quality Index

Assume you want translations with quality index above certain value. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code { "targetLanguages": [ "fr-FR" ], "enableMT": false, "minQuality": 50, "accountId":"qcad4wfqio", "units": [ {

SAP Translation HubDevelopment PUBLIC 185

Page 186: SAP Translation Hub

"key": "key1", "value": "cancel", "maxLength": 40, "searchData": { "language": "de-DE", "value": "Abbrechen" } }, { "key": "key2", "value": "apply", "maxLength": 40 } ]}

Response Body Example

Sample Code { "units": [ { "domain": "CA", "key": "key1", "value": "cancel", "translations": [ { "language": "fr-FR", "value": "Interrompre", "translationProvider": 0, "qualityIndex": 88 } ] }, { "domain": "PO", "key": "key2", "value": "apply", "translations": [ { "language": "fr-FR", "value": "appliquer", "translationProvider": 0, "qualityIndex": 71 } ]}

186 PUBLICSAP Translation Hub

Development

Page 187: SAP Translation Hub

Translating Texts in Simulation Run

Assume you want to execute the translations in Simulation Run, i.e.,the translations are not updated, but only the metadata like, translation providers and quality index is displayed. Also the data provided is not considered for billing. Based on these requirements, you use the following request payload:

Request Body Example

Sample Code { "targetLanguages": [ "fr-FR" ], "enableMT": false, "statsOnly" : true, "units": [ { "key": "key1", "value": "cancel", "maxLength": 40, "searchData": { "language": "de-DE", "value": "Abbrechen" } }, { "key": "key2", "value": "apply", "maxLength": 40 } ]}

Response Body Example

Sample Code

{ "units": [ { "domain": "CA", "key": "key1", "value": "cancel", "translations": [ { "language": "fr-FR", "translationProvider": 0, "qualityIndex": 88 } ] }, { "domain": "PO", "key": "key2", "value": "apply", "translations": [ { "language": "fr-FR", "translationProvider": 0, "qualityIndex": 71 }

SAP Translation HubDevelopment PUBLIC 187

Page 188: SAP Translation Hub

] } ]}

8.8 Testing the API

To test the individual API methods, for example, the translate method, you can use SAP API Business Hub or a REST service client.

Using SAP API Business Hub

To try out the SAP Translation Hub API without needing to paste the payload and API attributes manually into a REST service client, you can use SAP API Business Hub. In SAP API Business Hub, you can view the request and response models and, if you log on, try out the APIs in one central console.

Using a REST Service Client

To test the API methods, you can use a REST service client, for example, one of the clients that you can install as an extension to a Web browser.

1. In the REST service client, enter the URL specified in the API documentation.2. Ensure that you specify the following attributes correctly for each API:

○ Method value: GET or POST○ Content-Type parameter in the header: application/json; charset=utf-8

NoteTo consume the API, you enter the user and password for your account on SAP Business Technology Platform. Depending on the REST service client that you use, you are asked to enter the user and password after sending the request. Alternatively, you store the user name and password as an attribute in the request header. For more information, see the documentation for the REST service client that you are using.

3. As a starting point, use the sample code provided in the API documentation, and adapt the API calls using the optional parameters as required.

The following video shows how to test the translate method in a REST service client:

188 PUBLICSAP Translation Hub

Development

Page 189: SAP Translation Hub

Related Information

SAP Translation Hub on SAP API Business Hub

8.9 Document translation APIs with Machine Translation

With these APIs you can translate documents with machine translation.

Environment: Cloud Foundry

There are two scenarios for document translation with machine translation, these are handled by two separate APIs: synchronous and asynchronous document translation.

Synchronous translation(document-translation API):

● Easy to integrate and to consume.● Slightly faster than asynchronous translation.● Can't be used for files larger than 1GB or documents containing more than 1,000,000.00 characters.

Asynchronous translation(async-document-translation API):

● Integration effort is higher.● Can deal with large files and documents with more words.● User can access translations multiple times. However, the translation is only stored for three days.● Since the translation happens asynchronously, users can query the status and need not wait for the

translation to be made available.

Both APIs support the following document types:

Type Format

HTML *.html; UTF-8 encoding

Microsoft Office *.docx, *.xlsx, *.pptx

Text *.txt; UTF-8 encoding

XLIFF xliff1.2, xliff2

Both APIs support machine translation for the following language pairs:

Source language code Target language code

ar-SA en-US

bg-BG en-US

ca-ES en-US

cs-CZ en-US

da-DK en-US

SAP Translation HubDevelopment PUBLIC 189

Page 190: SAP Translation Hub

Source language code Target language code

de-DE bg-BG

de-DE cs-CZ

de-DE en-US

de-DE es-ES

de-DE fr-FR

de-DE hr-HR

de-DE hu-HU

de-DE it-IT

de-DE pl-PL

de-DE ro-RO

de-DE ru-RU

de-DE sr-Latn-RS

de-DE sk-SK

de-DE sl-SL

de-DE zh-CN

el-GR en-US

en-US ar-SA

en-US bg-BG

en-US ca-ES

en-US cs-CZ

en-US da-DK

en-US de-DE

en-US el-GR

en-US es-ES

en-US et-EE

en-US fi-FI

en-US fr-FR

en-US he-IL

en-US hi-IN

en-US hr-HR

en-US hu-HU

en-US it-IT

en-US ja-JP

en-US kk-KZ

190 PUBLICSAP Translation Hub

Development

Page 191: SAP Translation Hub

Source language code Target language code

en-US ko-KR

en-US lt-LT

en-US lv-LV

en-US ms-MY

en-US nl-NL

en-US nb-NO

en-US pl-PL

en-US pt-BR

en-US ro-RO

en-US ru-RU

en-US sr-Latn-RS

en-US sk-SK

en-US sl-SL

en-US sv-SE

en-US th-TH

en-US tr-TR

en-US uk-UA

en-US vi-VN

en-US zh-TW

en-US zh-CN

es-ES en-US

et-EE en-US

fi-FI en-US

fr-FR en-US

he-IL en-US

hi-IN en-US

hr-HR en-US

hu-HU en-US

it-IT en-US

ja-JP en-US

kk-KZ en-US

ko-KR en-US

lt-LT en-US

lv-LV en-US

SAP Translation HubDevelopment PUBLIC 191

Page 192: SAP Translation Hub

Source language code Target language code

ms-MY en-US

nb-NO en-US

nl-NL en-US

pl-PL en-US

pt-BR en-US

ro-RO en-US

ru-RU en-US

sk-SK en-US

sl-SL en-US

sr-Latn-RS en-US

sv-SE en-US

th-TH en-US

tr-TR en-US

uk-UA en-US

vi-VN en-US

zh-CN en-US

zh-TW en-US

Related Information

async-document-translation API - Process documentationdocument-translation API - Process documentation

8.10 Generating CSRF tokens for public APIs

CSRF Fetch Method

This method enables you to get the CSRF Token for public API in SAP Translation Hub.

Request

Access

192 PUBLICSAP Translation Hub

Development

Page 193: SAP Translation Hub

URL Example<base URL>/v2/domains

HTTP method GET

Authorization Basic authentication (user and password for SAP Business Technology Platform)

X-CSRF-Token Fetch

Request body example

<base URL>/v2/domains

Response

The result is a JSON object that contains the following key-value pairs, which are presented in the response header, and not as a cookie:

Key Description Part of response?

ID The ID of a domain or a domain group, depending on whether you use the on­lyGroups parameter in the request.

Always in response

name The short description of a domain or domain group, depending on whether you use the onlyGroups parameter in the request.

Always in response

Response header

Key Description

X-CSRF-Token 27DA1BE9AB4B19DB663BE2BC39897971 CSRF Token returned by server to be used for POST,PUT,DE­LETE requests

NoteThe token will expire after thirty minutes.

Errors

If the token is invalid, the system returns the following error message: HTTP Status 403 – Forbidden.

SAP Translation HubDevelopment PUBLIC 193

Page 194: SAP Translation Hub

9 End-User Guide:Translation Workflow Scenarios

You can use SAP Translation Hub to translate texts as part of integrated workflow scenarios. The scenarios enable you to translate texts, edit translations, and update the source location of texts.

To manage the translation workflow scenarios, SAP Translation Hub requires some information about the texts that you want to translate, such as the location of the texts you want to translate and the required target languages. You record this information in a translation project that is specific to a particular translation workflow scenario. You can use workflow scenarios for texts that reside in the following locations:

● ABAP Systems [page 196]● Files [page 211]● Git Repositories [page 217]

Main Steps of Translation Workflow Scenarios

When you start the translation process for one of the workflow scenarios, SAP Translation Hub does the following:

1. Reads the translation project.2. Gets translations from the following sequence of translation providers:

1. Company multilingual text repository (company MLTR)2. SAP multilingual text repository (SAP MLTR)3. SAP Machine Translation (SAP MT)

3. Enters translations in the source Git repository, ABAP system, or in a file that you download.

NoteTo avoid time-out issues in long-running projects in the UI, set the parameter Property HTML5.SocketReadTimeoutInSeconds to a value of greater than 180 seconds in the destination PUBLIC_API_SSO. You can access the destination Public_API_SSO as follows:

● In the SAP BTP Cockpit, go to the Neo environment.● In the menu Connectivity, choose Destinations.● Search for the destination PUBLIC_API_SSO.● Switch to Edit mode.● Add a new property HTML5.SocketReadTimeoutInSeconds.

194 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 195: SAP Translation Hub

● Maintain a value greater than 180 seconds.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Create Translation Projects for ABAP Short Texts Using an RFC [page 206]Create Translation Projects for Files [page 214]Create Translation Projects for Git Repository on SAP Business Technology Platform [page 221]Glossary [page 15]Working with Translation Projects [page 245]

9.1 Access UI for Translation Workflow Scenarios

You use a dedicated UI to manage translation projects as part of the translation workflow scenarios and to subsequently review and edit translations.

You access the UIs as follows:

1. In the SAP Business Technology Platform cockpit, choose Services.2. Choose the SAP Translation Hub tile.3. Choose Go to UI for Translation Workflow.4. To access the UI, choose Go to UI for Translation Workflow for SAP Translation Hub 2.0.

NoteYou can't use your custom corporate IDP. Instead, you have to use the P-user that is created when the IAS tenant is configured. This is due to an IAS limitation regarding the use of users that are created in custom tenants in order to connect to the BTP GIT from SAP Translation Hub.

SAP Translation Hub 2.0 UI - what is new?

The following list contains the changes that are available on the 2.0 UI:

● You can now upload more than one file of the same file type for your projects.● The UI uses Public API of SAP Translation Hub.● To improve performance, the system loads and lists the 50 most recent projects in descending order when

you open the UI.● After you upload a file, you can verify that the file is correct before you send it for translation.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 195

Page 196: SAP Translation Hub

Related Information

Language of UIs for SAP Translation Hub [page 28]

9.2 ABAP Systems

You can use SAP Translation Hub to translate texts in ABAP systems.

In your ABAP system, you enter the objects that contain the texts you want to translate in an object list. The object list represents the source of texts for SAP Translation Hub. In SAP Translation Hub, you manage the translation process by creating a translation project specific to ABAP systems.

SAP Translation Hub accesses the texts in your ABAP system using a remote function call (RFC). The communication between the two systems comprises three main parts:

● An RFC destination in the SAP Business Technology Platform cockpit● The Cloud Connector● RFC-enabled function modules in the ABAP system

The following graphic shows the main parts of the setup for ABAP systems:

Related Information

Blog About Setting Up the ABAP ScenarioCreate Translation Projects for ABAP Short Texts Using an RFC [page 206]Prerequisites for Translating ABAP Short Texts Using an RFC [page 197]

196 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 197: SAP Translation Hub

9.2.1 Prerequisites for Translating ABAP Short Texts Using an RFC

To use SAP Translation Hub to translate short texts that you create in ABAP systems, several prerequisites are required.

RecommendationTo make it easier to make the required settings in the different systems, carry out the steps in the following sequence.

1. ABAP Back-End System [page 197]2. Cloud Connector [page 200]3. SAP Business Technology Platform Cockpit [page 204]

9.2.1.1 ABAP Back-End System

To use SAP Translation Hub to translate short texts that you create in ABAP systems, several prerequisites are required.

The following sections contain the steps required as part of the ABAP translation workflow scenario. We recommend that you work through the steps in the following sequence.

1. Check Unicode code page

Check whether your system is a Unicode system. If you don't know, use one of the following options to find out:

● Call transaction code SNLS.

● Choose System Status... SAP System Data .

2. Install RFC-enabled function modules

To enable SAP Translation Hub to read texts in development objects in your ABAP system, RFC-enabled function modules are required in your ABAP system.

The required function modules are included in SAP Note 2349776 .

Since the updates in the SAP Note might already have been implemented in your system, implement the SAP Note only if the required Support Package (SP) has not been installed and the SAP Note has not been implemented using the Note Assistant (SNOTE) transaction. Check these points as follows:

● The Support Package (SP) level of the SAP_BASIS software component in your system is lower than the SP specified for your version of SAP_BASIS in the SAP Note.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 197

Page 198: SAP Translation Hub

Example

The version of SAP_BASIS installed in your system is 740 and the SP level is 15: choose SystemStatus... . In the SAP System Data section, choose the button to the right of the Product Version field.

On the Support Packages tab in the SAP Note, you see that the updates are part of SP 16 (SAPKB74016).

Since the SP level in your system (15) is lower than the SP that includes the required updates (16), check whether the SAP Note has been implemented using the Note Assistant (SNOTE) transaction.

● If the SP level in your system is lower than the SP level specified in the SAP Note, you won't have received the updates via an SP, but the SAP Note might have been implemented manually. To check, call the Note Assistant (SNOTE) transaction in your system and search for SAP Note 2349776.If you don't find the SAP Note in SNOTE, implement it manually.

3. Create a technical user

To enable SAP Translation Hub to communicate with the ABAP system via the Cloud Connector, you need a technical user of type Communications Data in your ABAP system. For more information, see User Administration.

4. Assign authorizations to the technical user

The technical user requires generic authorizations and authorizations that are specific to SAP Translation Hub. For general information about authorizations and role administration, see Reference Documentation for User and Role Administration or the corresponding documentation for the version of SAP NetWeaver that is installed in your system.

TipTo help join the dots in the big picture, this is the user that you enter when you create the RFC destination in the SAP Business Technology Platform cockpit: see the table in SAP Business Technology Platform Cockpit [page 204].

We recommend that you assign authorizations via a role in the Role Maintenance (PFCG) transaction. The generic documentation for creating a role and assigning the required authorizations is at Creating Roles. This is a generic procedure; the specifics for SAP Translation Hub are as follows:

NoteSince the role is for a technical user, don't make the settings that relate to the Menu tab.

1. In the Role Maintenance (PFCG) transaction, enter a technical name for the role and choose Single Role:

.2. Enter a description and save the role.

198 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 199: SAP Translation Hub

3. On the Authorizations tab, choose Change Authorization Data:

.In the subsequent dialog box, do not select a template.

4. To add authorization objects to the role, choose Manually:

.5. Enter the authorization objects S_RFC and S_ADMI_FCD.6. Customize the authorization objects using the data in the following table.

TipTo customize each authorization object, expand the folders until you see the technical names of the individual entries in the authorization object, such as the following:

.

Authorization Object Details

S_RFC ○ RFC_TYPE: FUNC (Function Module)○ RFC_NAME: LXE_STH_GET_OBJECT_LISTS,

LXE_STH_READ_OBJECT_LIST, LXE_STH_READ_TEXTS, LXE_STH_WRITE_TEXTS, DDIF_FIELDINFO_GET, RFC_GET_FUNCTION_INTER­FACE, RFCPING, SYSTEM_RESET_RFC_SERVER, RFC_METADATA, RFC_METADATA_GET

○ ACTVT: 16 (Execute)

S_ADMI_FCD Check that the field proposed by the system is S_ADMI_FCD (System Administration Function and specify activity TRNR (Translation Administration SLWA/SLWB).

7. Ensure that all traffic lights are green. If they are not, check your entries.8. To generate an authorization profile for the authorizations, choose Generate:

.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 199

Page 200: SAP Translation Hub

You are prompted for an authorization profile name. The system proposes a valid name in customer namespace. Confirm the entry or enter your own name and description.

9. Leave the tree display for authorizations by going back to the role overview screen.10. Choose the User tab and assign the role to the technical user that you created in the Create a technical user

section. To assign the role, enter the user ID of the technical user.11. Save the role.

5. Create an object list

Create an object list that contains the objects that you want to translate and schedule the object list report.

For information about object lists and the translation setup in ABAP systems, see SAP Help Portal at https://help.sap.com/viewer/p/SAP_NETWEAVER.

Under SAP NetWeaver Platform, choose your version of SAP NetWeaver, for example, SAP NetWeaver 7.5, and search for creating object lists.

9.2.1.2 Cloud Connector

To make your ABAP system reachable from SAP Translation Hub, you use the Cloud Connector.

The following sections describe the steps that are required to install and configure the Cloud Connector.

1. Familiarize yourself with the Cloud Connector

If you're new to the Cloud Connector, we recommend that you take some time to understand the purpose and general concepts. For more information, see Cloud Connector.

2. Install the Cloud Connector and perform initial configuration

1. Ensure that you have met the prerequisites described in Installation.

NoteAll examples in the documentation are based on a Microsoft Windows installation.

2. Follow the installation instructions for your operating system.3. In the Next Steps section, continue with the initial configuration: log in, change the administrator password,

and choose an installation type.4. Finalize the initial setup by entering details about the subaccount that you want to use, as described in the

Set Up Connection Parameters and HTTPS Proxy section of the initial configuration.

200 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 201: SAP Translation Hub

NoteEnsure that the user you enter for the subaccount is assigned the Cloud Connector Admin role, as described in Set Up Connection Parameters and HTTPS Proxy.

5. Save your entries and proceed with the Configure access control for RFC section further down this page.

3. Configure access control for RFC

To allow SAP Translation Hub to access your ABAP back-end system, configure the Cloud Connector to use the RFC protocol. The steps comprise two parts:

1. Exposing a channel to your ABAP system (see A. Exposing intranet systems).2. Creating a list of allowed function modules that can be accessed (see B. Granting access to function

modules).

A. Exposing intranet systems

1. If you are not still logged on from earlier steps, log on to the Cloud Connector.2. In the menu on the left, expand the required subaccount and choose Cloud To On-Premise.

3. On the ACCESS CONTROL tab, configure the Cloud Connector to expose an internal channel to your on-premise ABAP system. Choose the plus (+) sign.

4. Work through the steps in the Add System Mapping dialog box.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 201

Page 202: SAP Translation Hub

NoteIn the Add System Mapping dialog, you choose whether you want to use load balancing. Since each option requires different entries, we've created a section for each option. Choose whichever option you use for your ABAP system. The option that you select influences the settings that you make in the SAP Business Technology Platform cockpit.

With load balancing (system ID and message server)

Step A

Field Entry

Back-End Type ABAP System

Step B

Field Entry

Protocol RFC

Step C

Field Entry

Connection Type With load balancing (system ID and message server)

Step D

Field Entry

Message Server Enter the message server listed in the properties of the system entry in your SAPGUI logon window.

System ID Enter the three-character system ID of your ABAP system.

SAProuter (optional) Entry is optional

Step E

Field Entry

Virtual Message Server Leave the default entry.

Virtual System ID Leave the default entry.

Step F

Field Entry

Description Optional: to make it easier to record the purpose of your settings, enter a description.

On the final screen, a summary of your entries appears. If you want to check the connection at this stage, select Check Internal Host.Choose Finish.Without load balancing (application server and instance number)

202 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 203: SAP Translation Hub

Step A

Field Entry

Back-End Type ABAP System

Step B

Field Entry

Protocol RFC

Step C

Field Entry

Connection Type Without load balancing (application server and instance number)

Step D

Field Entry

Application Server Enter the message server listed in the properties of the system entry in your SAPGUI logon window.

Instance Number Enter the instance number listed in the properties of the system entry in your SAPGUI logon window.

SAProuter (optional) Entry is optional

Step E

Field Entry

Virtual Application Server Leave the default entry.

Virtual Instance Number Leave the default entry.

Step F

Field Entry

Description Optional: to make it easier to record the purpose of your settings, enter a description.

On the final screen, a summary of your entries appears. If you want to check the connection at this stage, select Check Internal Host.Choose Finish.

B. Granting access to function modulesIn addition to allowing access to a particular host and port, you also specify which function modules (known as resources in the Cloud Connector) are allowed to be invoked on that host.

1. Select the row containing the entry that you created in A. Exposing intranet systems and choose the plus sign in the section entitled Resource Available On <message server><system ID>:

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 203

Page 204: SAP Translation Hub

.2. To specify which function modules can be invoked by the Cloud Connector, enter the following data:

Field Entry

Function Name LXE_STH

Enabled Select the checkbox.

Naming Policy Prefix

Description Optional: Function modules for SAP Translation Hub.

3. Save your entries.

9.2.1.3 SAP Business Technology Platform Cockpit

To enable SAP Translation Hub to access your ABAP system via the Cloud Connector, you need a remote function call (RFC) destination that comprises the user name and password of the technical user that you created in the ABAP system.

There must be one RFC destination on subaccount level for each of the ABAP systems that you want to use. Create a destination as follows:

1. In the SAP Business Technology Platform cockpit, navigate to the required subaccount of your global account.

2. In the navigation structure on the left, choose Connectivity Destinations .3. Create a new destination with the following properties:

Field Entry

Name STH_<technical name of the subaccount on SAP Business Technology Platform>_<ABAP system ID>_<client in ABAP system>

Example○ Enterprise accounts: STH_aa956e49a_A32_400○ Trial accounts:

STH_p1942789110trial_A32_400

Type RFC

204 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 205: SAP Translation Hub

Field Entry

Description Optional: enter a description for the RFC description.

Location ID Not required.

User Enter the user ID of the technical user that you created in the ABAP back-end system.

Password Enter the password of the technical user that you created in the ABAP back-end system.

Repository User Not required.

Repository Password Not required.

You also need some additional properties. The additional properties that you require depend on the load balancing option that you choose when you configure access control in the Cloud Connector (see Configure access control for RFC Exposing intranet systems in Cloud Connector [page 200]). We'll

start with the load balancing option:

With load balancing (system ID and message server)

Property Value

jco.client.client Enter the client - as a three-digit number - of the on-prem­ise ABAP system.

For more information about the property, see User Logon Properties.

jco.client.mshost Enter the message server that you entered in the Cloud Connector - see the Configure access control for RFC sec­tion in Cloud Connector [page 200].

For more information about the property, see the Load Balancing Configuration section in Target System Configu-ration.

jco.client.r3name Enter the three-character system ID of the ABAP system.

For more information about the property, see the Load Balancing Configuration section in Target System Configu-ration.

jco.client.group Enter the Logon group to which the user belongs.

Example: USER, PUBLIC

Make sure that the user has authorization to execute the RFC function module RFC_METADATA_GET

Without load balancing (application server and instance number)

Property Value

jco.client.client Enter the client (as a three-digit number) to be used in the on-premise ABAP system.

For more information about the property, see User Logon Properties.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 205

Page 206: SAP Translation Hub

Property Value

jco.client.ashost Enter the message server that you entered as the applica­tion server in the Cloud Connector - see the Configure ac­cess control for RFC section in Cloud Connector [page 200].

For more information about the property, see Target Sys­tem Configuration.

jco.client.sysnr Enter sapgw<##>, where ## is the two-digit system number that you entered as the instance number in the Cloud Connector - see the Configure access control for RFC section in Cloud Connector [page 200].

For more information about the property, see Target Sys­tem Configuration.

4. Save your entries.

9.2.2 Create Translation Projects for ABAP Short Texts Using an RFC

SAP Translation Hub uses translation projects to manage the translation workflow of short texts from object lists that are generated in ABAP systems. SAP Translation Hub communicates directly with the selected ABAP system using a remote function call (RFC).

See Prerequisites for Translating ABAP Short Texts Using an RFC [page 197].

To translate short texts created in ABAP systems, SAP Translation Hub requires some details, such as the object list that contains the texts in the ABAP system and the required target languages.

1. Create a translation project by choosing ABAP Project as the type.2. Enter the following data:

Field Entry

Project Name Enter a name for your translation project, for example, objectlist01. We recommend that you use a name that enables you to identify the object list from the selected ABAP system.

ABAP System Select the ABAP system from which you want to translate texts.

NoteWondering why you see System Configured on Subscription Level in the dropdown? This means that the RFC destination for an ABAP system was created on subscription level, not on subaccount level. For more information, see the SAP Business Technology Platform Cockpit section in the prerequisites.

Object List Select the object list that contains your source texts to be translated. To select an object list, open the value help of the field and search for an ID or the description of an object list, using wildcards (*) if required. The search is case-sensitive.

206 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 207: SAP Translation Hub

Field Entry

NoteTo improve the performance of the search, search only by ID or only by description. To ac­cess the specific search fields for an ID and a description, choose Show Filter Bar.

Domain Select the translation domain that most closely matches the application area or business con­text of your source texts, for example, Financials or Logistics.

TipIf you don't use domains or a similar concept and you're not sure what to select, we rec­ommend General.

Source Language Select the source language from which you want to translate the texts in your source file. For more information, see Supported Languages [page 23].

Target Languages Select the target languages into which you want to translate the texts in the object list.

NoteTo improve performance, select only those target languages that you need.

Post-Editing Required Decide whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review proc­ess. If you enable this option, enable Review Required as well. For more information, see Man­aging Post-Editing and Review Steps.

Review Required Decide whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Use Company MLTR Decide whether you want to use a company MLTR that contains your own language data as the translation provider.

Select Company MLTR

If you decide to use a company MLTR, you need to select which one to use. You can select one company MLTR for each translation project. Only active company MLTRs are available for se­lection.

Four-Digit Target Files Select this option to create translated files with four-digit language codes, such as ja_JP or de_DE. If this option is not selected, then the translated files will be created with a two-digit language code, such as ja or de.

3. Save the translation project.

Your translation project contains the data required to translate the texts from the object list in your ABAP system.

NoteOnce you have created your project, you can edit the project to add more target languages. If you add more target languages after you have translated the texts in a translation project, the translations of existing target languages are kept, even if you remove a language and add it again later.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 207

Page 208: SAP Translation Hub

Related Information

Access UI for Translation Workflow Scenarios [page 195]Integrating Your Own Language Data [page 29]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]Translate ABAP Short Texts Using an RFC [page 208]Update Translations in ABAP Systems Using an RFC [page 210]

9.2.3 Translate ABAP Short Texts Using an RFC

You use translation projects to translate short texts created in ABAP systems as part of the translation workflow of SAP Translation Hub.

You have made the settings described in Prerequisites for Translating ABAP Short Texts Using an RFC [page 197] and there is a translation project for the ABAP object list that contains the texts that you want to translate.

On the SAP Translation Hub UI for translation projects, choose the translation project that refers to the object list to be translated. Then choose one of the translation options in the bottom right of the screen:

What Do You Want to Do? Choose This Option Follow-On Tasks

Translate the texts and update the ABAP system immediately; I don't need to review them before updating the ABAP system.

NoteAny existing translations of your texts in the ABAP system will be overwritten.

Translate and Transfer You can nevertheless check the transla­tions on the Translations tab.

Translate the texts and review them. Some texts are tricky, so I want to make sure the translations are up to scratch before updating the ABAP

In the context menu on the Translate and Transfer button, choose Translate Without Transfer to ABAP.

Review the translations on the Translations tab. After you're satisfied with the translations, transfer them to the ABAP system by choosing Transfer to ABAP.

Handling Translation Projects That Are Canceled

In certain situations, you might decide to cancel a translation project or the processing might be canceled due to connectivity issues. In these cases, we recommend that you transfer the available translations to the ABAP system before further processing the translation project. By transferring the available translations to the ABAP system, you ensure that SAP Translation Hub does not translate the same texts again. And in the case of enterprise accounts, this process ensures that you are not billed for the same translations again.

208 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 209: SAP Translation Hub

ExampleYou start the translation process for an ABAP translation project. When only 30% of the translation project has been translated, you cancel the translation process.

If you start the translation process for the same translation project again without first transferring the available translations to the ABAP system, SAP Translation Hub translates the texts again. If you have an enterprise account, you are billed for the translations again.

To avoid this situation, we recommend that after you cancel a translation project, you transfer the available translations to your ABAP system. Start the translation project again only after you have transferred the translations to your ABAP system.

The source texts are translated into the target languages specified in the translation project.

Review TranslationsIf you want to view or change the translations in the project, choose the Translations tab. You see all the translations in the translation project and the translation provider that SAP Translation Hub uses for each text. If some of the texts in the object list are already translated in your ABAP system, SAP Translation Hub does not translate the texts again; in this case, ABAP appears as the translation provider.

NoteAn ABAP system object can contain more than one text element. For example, a data element contains multiple field labels of different lengths plus a short description. In your translation projects, you see all text elements that belong to a single object, which means that all text elements have the same object name. You also see the object type, such as DTEL for data elements, and the length of each field, as defined in the ABAP system.

Consider Length RestrictionsSAP Translation Hub uses the maximum length defined for each text in an object in the ABAP system to find translations of the correct length. Note that this feature applies only to texts that SAP Translation Hub retrieves from the SAP multilingual text repository (SAP MLTR). If SAP Translation Hub cannot find a translation that fulfills the length restriction defined in the ABAP system, SAP Translation Hub truncates the text and adds an ellipsis (...) to the truncated text to show that the text has been truncated.

View Quality of TranslationsThe quality index helps you to judge the quality of translations. The higher the number on a scale from 0-100, the better the quality. For more information, see Quality Index.

Update TranslationsIf you change any of the translations, save your changes in the translation project and transfer the changes to the ABAP system manually.

Example

For an overview of how to translate ABAP short texts, check out the following video on YouTube:

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 209

Page 210: SAP Translation Hub

Related Information

Access UI for Translation Workflow Scenarios [page 195]Create Translation Projects for ABAP Short Texts Using an RFC [page 206]Update Translations in ABAP Systems Using an RFC [page 210]Quality Index [page 16]

9.2.4 Update Translations in ABAP Systems Using an RFC

You can use the SAP Translation Hub UI to add or change translations created by SAP Translation Hub during the translation workflow and to push the translations directly to an ABAP system.

You have used the translation workflow of SAP Translation Hub to translate the texts from an ABAP object list.

When you use the translation workflow, SAP Translation Hub stores the translations of texts from an ABAP object list for each target language. If required, you can create or update translations, and then push them back to the ABAP system.

NoteThis process overwrites the existing translations from the ABAP system. Bear this in mind if you add or adjust translations in your ABAP system and you want to keep those changes.

1. On the SAP Translation Hub UI, choose the translation project that refers to the ABAP object list whose translations you want to update.

2. Choose the Translations tab.

SAP Translation Hub shows the languages defined in the translation project along with the source texts from the object list and the translations.

3. Choose the target language in which you would like to check or update translations.4. In the Translated Text column, update translations as required.

The translation provider is updated to show that you changed the text that SAP Translation Hub entered; your user name also appears under the technical name to show that you changed the translation.

5. Save your changes.

If you need to change the translations in other target languages, repeat the previous steps for each target language.

6. To update your translation changes in the ABAP system, choose Transfer to ABAP.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Building the Base URL of SAP Translation Hub [page 51]Create Translation Projects for ABAP Short Texts Using an RFC [page 206]Translate ABAP Short Texts Using an RFC [page 208]

210 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 211: SAP Translation Hub

9.3 Files

You can use SAP Translation Hub to translate the contents of files that you upload manually.

In a typical scenario, you develop an application in a particular development environment and store your translation-relevant texts in a resources file. Examples of resources files are .properties files and .xliff files. In SAP Translation Hub, you manage the translation process by creating a translation project for files that you upload.

When you want to translate the contents of the file, you upload the file from your local development environment to the translation project in SAP Translation Hub. After SAP Translation Hub has translated the texts in the translation project, you download the translated files and import them in your local development environment.

The following graphic shows an overview of the file upload scenario:

Related Information

Create Translation Projects for Files [page 214]Supported File Formats [page 211]

9.3.1 Supported File Formats

You can use SAP Translation Hub to translate files in the following formats.

File Format File Extension Supported Encoding Additional Information

Android XML .xml UTF-8 None.

General XLIFF .xlf, .xliff UTF-8 XLIFF version 1.2 is sup­ported.

iOS strings .strings UTF-8 None.

iOS XLIFF .xlf, .xliff UTF-8 None.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 211

Page 212: SAP Translation Hub

File Format File Extension Supported Encoding Additional Information

Java properties .properties UTF-8 Although it is possible to use ISO-8859-1 encoded source files, translated files are UTF-8 encoded. For ISO-8859-1 compatibility, use the Escape Non-ASCII characters option when you create your translation project.

212 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 213: SAP Translation Hub

File Format File Extension Supported Encoding Additional Information

JSON .json UTF-8 Code Syntax

{ "key1": "value1", "key2": "value2" }

Sample Code

{ "okButton": "OK", "cancelButton": "Cancel" }

NoteIf your JSON files contain either of the following:

● variables● tags● whitespaces

like in this example:

Sample Code

<p>Clicking <span style="font-weight: bold;">#{fieldname} I{fieldicon}</span> quits the transaction.</p>

, we recommend that you convert the JSON file to an XLIFF file to en­sure that it is translated correctly. There are tools

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 213

Page 214: SAP Translation Hub

File Format File Extension Supported Encoding Additional Information

you can use to help with the conversion.

SAP HANA text bundle .hdbtextbundle UTF-8 None.

XLIFF for SAP Smart Busi­ness services

.xlf UTF-8 None.

9.3.2 Create Translation Projects for Files

SAP Translation Hub enables you to upload and translate files in various formats.

The encoding of the file is supported by SAP Translation Hub - see Supported File Formats [page 211].

1. Create a translation project by choosing File Upload as the type.2. Enter the following data:

Field Entry

Project Name Enter a name that describes your translation project.

Escape Non-ASCII Chars

Select this option if you want to show machine-readable texts in the translated file that you download. The file will contain Unicode escape sequences for non-ASCII characters ( \uxxxx). This is required only if your translations involve Java properties files with ISO-8859-1 encoding, and you need to interpret the content.

If you do not select this option (default), the translated file contains human-readable text.

Domain Select the translation domain that most closely matches the business context of your source texts, for example, Financials or Logistics.

TipIf you don't use domains or a similar concept and you're not sure what to select, we rec­ommend General.

Source Language Select the source language from which you want to translate the texts in your source file. For more information, see Supported Languages [page 23].

Target Languages Select the target languages into which you want to translate the texts in your source file.

NoteTo improve performance, select only those target languages that you need.

Post-Editing Required Decide whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review proc­

214 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 215: SAP Translation Hub

Field Entry

ess. If you enable this option, enable Review Required as well. For more information, see Man­aging Post-Editing and Review Steps.

Review Required Decide whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Use Company MLTR Decide whether you want to use a company MLTR that contains your own language data as the translation provider.

Select Company MLTR

If you decide to use a company MLTR, you need to select which one to use. You can select one company MLTR for each translation project. Only active company MLTRs are available for se­lection.

Four-Digit Target Files Select this option to create translated files with four-digit language codes, such as ja_JP or de_DE. If this option is not selected, then the translated files will be created with a two-digit language code, such as ja or de.

NoteSome languages will always be represented by a four-digit code. You can find them in this list marked with an asterisk: Supported Languages [page 23].

3. Save the translation project.4. Upload your file by selecting it using the value help or by dragging and dropping the file directly onto the

Details screen of your project.

Your translation project contains the data required to translate the texts in your source file.

Once you have created your translation project, note the following:

● You cannot change the source file type.● You can add more target languages, but to enable SAP Translation Hub to register additional target

languages, you must upload the source file again.● You can upload the source file as many times as you want, and even replace the source file with a different

file. However, if you upload a different file, your project’s source texts will be replaced with the source texts from the new file that you upload. Any translations that you have done in the project will be deleted. To avoid losing your work, export your translations before you upload a different source file. For more details, see Translate Files.

● If you use ABAP-based XLIFF files, there are usually multiple .xlf files, because ABAP systems generate one file per language pair during the export process. Upload only one of the files; it does not matter which file you upload. SAP Translation Hub does not import any of the translations that the XLIFF files contain.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Integrating Your Own Language Data [page 29]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 215

Page 216: SAP Translation Hub

Supported Languages [page 23]Translate Files [page 216]Update and Download Translations in Files [page 217]

9.3.3 Translate Files

You use translation projects to translate files of the supported formats as part of the translation workflow of SAP Translation Hub.

There is a translation project for your source file, containing the texts to be translated.

On the SAP Translation Hub UI for translation projects, choose the translation project that refers to the source file to be translated, and choose Get Translations.

For an overview of how to translate a file, check out the following video that shows how to translate a Java properties file:

The source texts are translated into the target languages specified in the translation project. For more information, see the following sections.

Review Translations

To check the translations in the project, choose the Translations tab. You see all translations in the translation project and the translation provider that SAP Translation Hub uses for each text.

View Quality of Translations

The quality index helps you to judge the quality of translations. The higher the number on a scale from 0-100, the better the quality. For more information, see Quality Index.

Download Translations

To use your translations outside of SAP Translation Hub, choose Download Translations.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Building the Base URL of SAP Translation Hub [page 51]Create Translation Projects for Files [page 214]Quality Index [page 16]Update and Download Translations in Files [page 217]

216 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 217: SAP Translation Hub

9.3.4 Update and Download Translations in Files

You can use the SAP Translation Hub UI to add or change translations created by SAP Translation Hub during the translation workflow.

You have used the translation workflow of SAP Translation Hub to translate the texts from a file that you have uploaded manually.

When you use the translation workflow, SAP Translation Hub stores the translations of texts from your source file for each target language. If required, you can create or update translations, and finally download them in a .zip file. When you download your translations, you get one file per target language (or per language pair for XLIFF files).

1. On the SAP Translation Hub UI, choose the translation project that refers to the uploaded source file whose translations you want to update.

2. Choose the Translations tab.

SAP Translation Hub shows the languages defined in the translation project along with the source texts from the object list and the translations.

3. Choose the target language in which you would like to check or update translations.4. In the Translated Text column, update translations as required.

The translation provider is updated to show that you changed the text that SAP Translation Hub entered.5. Save your changes.

If you need to change the translations in other target languages, repeat the previous steps for each target language.

6. To use your translations outside of SAP Translation Hub, choose Download Translations.

SAP Translation Hub provides a.zip file that contains one file in the corresponding format for each target language (or for each language pair for XLIFF files). You can then extract the .zip file and manually upload the target files in your original application.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Building the Base URL of SAP Translation Hub [page 51]Create Translation Projects for Files [page 214]Translate Files [page 216]

9.4 Git Repositories

You can use SAP Translation Hub to translate texts in .properties files that you manage in Git repositories.

The following types of Git repository are supported:

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 217

Page 218: SAP Translation Hub

● Git Repository on SAP Business Technology Platform [page 218]● Git Repository Hosted By Your Enterprise [page 227]● Git Repository Hosted on the Web [page 235]

9.4.1 Git Repository on SAP Business Technology Platform

You can use SAP Translation Hub to translate texts in .properties files that you manage in the Git repository on SAP Business Technology Platform.

NoteAlthough you do not have to use SAP Web IDE as the development environment, to make it easier to explain and visualize the entire scenario, the following explanations and graphics contain SAP Web IDE.

In SAP Translation Hub, you manage the translation process by creating a translation project specific to the Git scenario. SAP Translation Hub accesses the texts in your Git repository. This means that you must ensure all translation-relevant texts have been committed and pushed to your Git repository before you start the translation process.

The process comprises the following main steps:

1. You commit and push the files in your SAP Web IDE project to the Git repository.2. SAP Translation Hub reads the files in the Git repository.3. After SAP Translation Hub translates the texts, it pushes the translated files to the Git repository.4. You pull the changes in the Git repository to your SAP Web IDE project.

The following graphic shows the main steps and parts in the Git repository scenario:

Related Information

Create Translation Projects for Git Repository on SAP Business Technology Platform [page 221]

218 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 219: SAP Translation Hub

9.4.1.1 Configure a Destination for your Git Repository

This section contains the steps required to configure a destination for a Git repository on SAP Business Technology Platform.

You configure the HTTP destination for your Git repository if you are using your own identify provider (IDP).

1. In the SAP Business Technology Platform cockpit, choose Services.2. Choose SAP Translation Hub from the list of services.3. On the service description screen, choose Configure Service.4. Choose New Destination and enter the following data:

Field Entry

Name gitConnectionConfigType HTTPDescription Enter a description of your choice, for example, Configuration for Git

connection.

URL Enter the Git URL for the SAP Business Technology Platform region host you are by using the following pattern: https://git.<your SAP Business Technology Platform region host>

You can take the region host from the base URL of SAP Business Technology Platform.

○ If you have an enterprise account, your entry depends on your Neo region and host as follows:

○ Australia (Sydney) (ap1.hana.ondemand.com), enter https://git.ap1.hana.ondemand.com

○ Europe (Amsterdam) (eu3.hana.ondemand.com), enter https://git.eu3.hana.ondemand.com

○ Europe (Rot) (hana.ondemand.com), enter https://git.hana.ondemand.comAlternatively, for eu1.hana.ondemand.com), enter https://git.eu1.hana.ondemand.com

○ US East (Ashburn) (us1.hana.ondemand.com), enter https://git.us1.hana.ondemand.com

○ US East (Sterling) (us3.hana.ondemand.com), enter https://git.us3.hana.ondemand.com

Proxy Type InternetAuthentication BasicAuthentication

User Enter the desired user based on the following pattern: <valid user name for SAP Business Technology Platform>,<e-mail ID for the same user>@<domain name>

Example: username,[email protected]

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 219

Page 220: SAP Translation Hub

Field Entry

NoteAccess to a Git repository is granted only to users who are authenticated by the SAP ID service. This user must have a developer role in your account and have a valid S user. This configuration means that all operations from SAP Translation Hub to the Git server of your region host (https://git.<your SAP Business Technology Platform region host>.ondemand.com) are executed by the user that you specify here, and not by the actual end user who performs the action.

Password Enter the user's password.

5. Wait for the changes to take effect; depending on the system performance, it can take several minutes for the changes to take effect.

Example

Here is an example of the configuration settings for a destination involving an SAP Business Technology Platform Git repository. The User field contains both the user ID, and the user's e-mail separated by a comma; this means the user can skip specifying the e-mail in the Additional Properties popup window.

Related Information

Regions and Hosts [page 20]

220 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 221: SAP Translation Hub

9.4.1.2 Create Translation Projects for Git Repository on SAP Business Technology Platform

SAP Translation Hub uses translation projects to manage the translation workflow of properties files in applications for which you use the Git repository on SAP Business Technology Platform.

● The encoding of the properties file is UTF-8.● If you use your own identity provider (IDP), make the settings described in Configure a Destination for your

Git Repository [page 219].● If you use the suggestions API method to propose texts in the code editor of SAP Web IDE, use one of

the browsers listed in Open SAP Web IDE.● If you are translating i18n.properties files for an SAP Web IDE project, see Use SAP Translation Hub.

To translate source .properties files, SAP Translation Hub requires some details, such as the location of the source .properties file in the Git repository and the required target languages.

1. Create a translation project by choosing Git Project as the type.2. Enter the following data:

Field Entry

Project Name Enter a name that describes your translation project.

Path to Properties File Enter or select the source .properties file of your application in the Git repository.

TipTo select the required .properties file from a dropdown, save your Git credentials.

Escape Non-ASCII Chars

Select to show machine-readable texts in your downloaded translations file. The file then con­tains Unicode escape sequences for non-ASCII characters ( \uxxxx). This is required only when your translations involve ISO-8859-1 encoding and you need to interpret the content.

If you do not select this option (default), the translated file contains human-readable text.

Domain Select the translation domain that most closely matches the business context of the applica­tion, such as Financials or Logistics.

TipIf you don't use domains or a similar concept and you're not sure what to select, we rec­ommend General.

Source Language Select the source language from which you want to translate the texts in your source file. For more information, see Supported Languages [page 23].

Target Languages Select the target languages into which you want to translate the texts in the .properties file.

NoteTo improve performance, select only those target languages that you need.

Git Server Select SAP Business Technology Platform.

Application Name Enter the name of the Git repository that contains the application and its source properties file that you want to translate. Use the entry in the Name column of the Git Repositories node in

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 221

Page 222: SAP Translation Hub

Field Entry

the navigation area of the SAP Business Technology Platform cockpit. To see the Git reposito­ries for your account, in the SAP Business Technology Platform cockpit, choose

Repositories Git Repositories .

Branch By default, the branch is master. If you're using a different branch in the Git repository, change the entry as required.

Git Credentials If you want to save your Git credentials in SAP Translation Hub, choose Save. By entering the Git credentials, you can choose from possible .properties files in a dropdown on the trans­lation project UI and you do not have to enter your Git credentials each time you translate your translation project.

NoteIf Destination appears, your Git credentials are saved in a destination in the SAP Business Technology Platform cockpit.

Path to Properties File Enter or select the source .properties file of your application in the Git repository.

TipTo select the required .properties file from a dropdown, save your Git credentials.

Escape Non-ASCII Chars

Select to show machine-readable texts in your downloaded translations file. The file then con­tains Unicode escape sequences for non-ASCII characters ( \uxxxx). This is required only when your translations involve ISO-8859-1 encoding and you need to interpret the content.

If you do not select this option (default), the translated file contains human-readable text.

Keep Translations If you already translated the texts in your .properties file, for example, using a different translation provider to SAP Translation Hub, your application already contains translations in language-specific .properties files. You use the Keep Translations option to determine how SAP Translation Hub handles these existing translations:

○ If you want to keep the existing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application, choose Yes.

NoteWhen you use SAP Translation Hub to translate the texts in your .properties file, SAP Translation Hub stores the translations. If you use SAP Translation Hub to trans­late your .properties file a second or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous translation of the .properties file.

If you change any translations directly in the language-specific .properties files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ig­nores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Translation Hub.

○ If you want SAP Translation Hub to translate all the texts in your .properties file from scratch, and therefore overwrite any existing translations in your language-spe­cific .properties files, choose No.

222 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 223: SAP Translation Hub

Field Entry

Post-Editing Required Decide whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review proc­ess. If you enable this option, enable Review Required as well. For more information, see Man­aging Post-Editing and Review Steps.

Review Required Decide whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Use Company MLTR Decide whether you want to use a company MLTR that contains your own language data as the translation provider.

Select Company MLTR

If you decide to use a company MLTR, you need to select which one to use. You can select one company MLTR for each translation project. Only active company MLTRs are available for se­lection.

Four-Digit Target Files Select this option to create translated files with four-digit language codes, such as ja_JP or de_DE. If this option is not selected, then the translated files will be created with a two-digit language code, such as ja or de.

3. Save the translation project.

Your translation project contains the data required to translate the texts in a properties file. You can use the translation workflow to get an initial translation of the texts in the .properties file, as well as to update translations whenever changes are made to the texts in the source .properties file.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Integrating Your Own Language Data [page 29]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]Translate Properties Files [page 223]Update Translations in Properties Files [page 225]

9.4.1.3 Translate Properties Files

You use translation projects to translate .properties files, which are stored in a Git repository, as part of the translation workflow of SAP Translation Hub.

There is a translation project for the application that contains the .properties file that you want to translate.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 223

Page 224: SAP Translation Hub

On the SAP Translation Hub UI for translation projects, choose the translation project that refers to the .properties file to be translated, and choose one of the translation options in the bottom right of the screen:

What Do You Want to Do? Choose This Option Follow-On Tasks

Translate the texts in the .properties file and create .properties files for each target language in the Git reposi­tory; I don't want to review them first.

Translate and Push

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

The target language properties files al­ready exist in your Git repository, but you can still check the translations on the Translations tab.

Translate the texts and review them. Some texts are tricky, so I want to make sure that the translations are up to scratch before I push them to the Git re­pository.

In the context menu on the Translate and Push button, choose Translate Without Push.

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

Review the translations on the Translations tab. When you're satisfied with the translations, push them to the Git repository.

NoteTo verify that your .properties file has been translated and updated in your Git repository, view details in the Git repository browser.

For SAP Business Technology Platform, view the Git repository from the navigation area of the SAP Business Technology Platform cockpit. Choose Repositories Git Repositories and then choose the glasses icon in the row for the required Git repository.

The .properties file is translated into the target languages specified in the translation project. For more information, see the following sections.

Review Translations

If you want to view or change the translations in the project and see the translation provider for each text, choose the Translations tab.

View Quality of Translations

The quality index helps you to judge the quality of translations. The higher the number on a scale from 0-100, the better the quality. For more information, see Quality Index.

Updating Translations in Git Repository

If you change any of the translations, save your changes and push the changes to the Git repository manually.

224 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 225: SAP Translation Hub

Example

For an overview of how to translate a .properties file that you develop in SAP Web IDE and manage in the Git repository of SAP Business Technology Platform, check out the following video:

Related Information

Access UI for Translation Workflow Scenarios [page 195]Quality Index [page 16]

9.4.1.4 Update Translations in Properties Files

You can use the SAP Translation Hub UI to add or change translations created by SAP Translation Hub during the translation workflow.

You have used the translation workflow of SAP Translation Hub to translate the texts in the .properties file of an application.

When you use the translation workflow of SAP Translation Hub, SAP Translation Hub enters translations in .properties files for each target language. If required, you can create or update the texts in the .properties files for each target language.

1. On the SAP Translation Hub UI, choose the translation project that refers to the .properties files whose translations you want to update.

2. Choose the Translations tab.

SAP Translation Hub shows the languages defined in the translation project along with the source texts from the .properties file and the translations.

3. Choose the target language in which you would like to check or update translations.4. In the Translated Text column, update translations as required.

The translation provider is updated to show that you changed the text that SAP Translation Hub entered.5. Save your changes.

If you need to change the translations in other target languages, repeat the previous steps for each target language.

6. To add any translation changes to the .properties files in the Git repository, choose Push.

To view the .properties files in your development environment, for example, in SAP Web IDE, you must pull the latest changes from the Git repository.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 225

Page 226: SAP Translation Hub

Related Information

Access UI for Translation Workflow Scenarios [page 195]

9.4.1.5 Sample Scenario with SAP Web IDE

You can use SAP Translation Hub to translate an HTML5 application that you create in SAP Web IDE.

● You have a trial account on SAP Business Technology Platform.● You have enabled SAP Translation Hub in the service catalog on SAP Business Technology Platform.● You are using one of the browsers listed in Open SAP Web IDE.

This section contains the main steps required to translate the texts that you create for an HTML5 application in SAP Web IDE on SAP Business Technology Platform.

NoteFor details about the individual steps, especially the steps required to deploy your app on SAP Business Technology Platform and to manage the Git repository on SAP Business Technology Platform, see the following:

● Video on YouTube: https://youtu.be/ytoP_4uBllw● Tutorial: Create and translate an SAP Fiori app with SAP Translation Hub

1. On SAP Business Technology Platform, create an HTML5 application using SAP Web IDE.During the development process, you can use the following features to propose texts in English:○ Propose texts from SAP Translation Hub when you create new strings (see Managing i18n Strings in

Working in the Code Editor)○ Propose existing texts from the local i18n.properties file (see Using Code Completion)

2. Save your HTML5 project, and commit and push your changes to the Git repository.

If you use the Git repository on SAP Business Technology Platform, note the steps required to initialize your Git repository and to deploy your application to SAP Business Technology Platform.

3. Call the SAP Translation Hub UI, and create a translation project for the required source properties file in your HTML5 application.

4. Choose the translation project for the required source properties file in your HTML5 application, and choose Get Translations.

5. To see the translated properties files in SAP Web IDE, pull the changes from your Git repository.

There is a properties file for each of the target languages that you entered in the translation project for your HTML5 application. The properties files are stored in the same project in the Git repository as the rest of the project files.

Related Information

Create Translation Projects for Git Repository on SAP Business Technology Platform [page 221]

226 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 227: SAP Translation Hub

Deploying Applications to SAP Business Technology PlatformSAP Web IDETranslate Properties Files [page 223]End-User Guide:Translation Workflow Scenarios [page 194]Update Translations in Properties Files [page 225]

9.4.2 Git Repository Hosted By Your Enterprise

SAP Translation Hub can connect to on-premise Git repositories that are hosted by your enterprise.

SAP Translation Hub pulls the files for translation from the on-premise Git repository and push back the translated files.

SAP Translation Hub accesses the texts in your on-premise Git repository using an HTTP(S) connection. The communication between the two systems comprises three main parts:

● An HTTP connection in the SAP Business Technology Platform cockpit● The Cloud Connector● Your on-premise Git repository

The following graphic shows the main parts of the setup:

Related Information

Prerequisites for Git Repository Hosted By Your Enterprise [page 228]Configure the Cloud Connector [page 228]Create Translation Projects for Git Repository Hosted By Your Enterprise [page 230]

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 227

Page 228: SAP Translation Hub

9.4.2.1 Prerequisites for Git Repository Hosted By Your Enterprise

This section contains the integration tasks that are required before you can use an on-premise Git repository that is hosted by your enterprise.

Task More Information

You have account logon details for the on-premise Git reposi­tory.

None.

You have familiarized yourself with the purpose and general concepts of the Cloud Connector.

See Scenarios and Basic Tasks in Cloud Connector.

You have installed the Cloud Connector and completed the initial configuration.

1. See Tasks in Installation.2. Complete the steps described in Initial Configuration.

NoteEnsure that you have Cloud Connector administrator rights.

You have configured the Cloud Connector to communicate with your on-premise Git repository.

See Configure the Cloud Connector [page 228].

9.4.2.2 Configure the Cloud Connector

To enable SAP Translation Hub to communicate with your on-premise Git repository, you configure the Cloud Connector.

1. Log on to the Cloud Connector (see Initial Configuration).2. In the menu on the left, expand the required subaccount and choose Cloud To On-Premise.

228 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 229: SAP Translation Hub

3. On the ACCESS CONTROL tab, configure the Cloud Connector to expose an internal channel to your on-premise Git server. Choose the plus (+) sign.

4. Make the settings in the following table:

Field Entry

Back-End Type Non-SAP SystemProtocol Enter HTTP or HTTPS, depending on your Git server requirements.

Internal Host Enter the internal host for your Git server.

Internal Port Enter the internal port for your Git server.

Virtual Host Leave the default value - the virtual host is the same as the internal host.

Virtual Port 80Principal Type NoneDescription Enter an optional description for the mapping.

Check Internal Host Optional: If you want to test the connection to the internal host, select the checkbox.

For more information, see Exposing Intranet Systems in Configuring Access Control (HTTP).

5. In the Resources Accessible On <host>:<port> section on the ACCESS CONTROL tab, choose the plus (+) sign.

6. Enter a path to the server that you defined in a previous step by making the settings described in the following table:

Field Value

URL Path /

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 229

Page 230: SAP Translation Hub

Field Value

Enabled Select

Access Policy Path and all sub-paths

Description Optional: Enter a description for the resource.

7. Choose Save.

Related Information

Cloud Connector

9.4.2.3 Create Translation Projects for Git Repository Hosted By Your Enterprise

Translation projects in SAP Translation Hub can be created with reference to an on premise Git repository that is hosted by your enterprise.

See Prerequisites for Git Repository Hosted By Your Enterprise [page 228].

To translate source .properties files, SAP Translation Hub requires some details, such as the location of the source .properties file in the Git repository and the required target languages.

1. Call the UI for translation projects, as described in Access UI for Translation Workflow Scenarios.2. Create a translation project by choosing Git Project as the type.3. Enter the following data:

Field Entry

Project Name Enter a name that describes your translation project.

Domain Select the translation domain that most closely matches the business context of the applica­tion, such as Financials or Logistics.

TipIf you don't use domains or a similar concept and you're not sure what to select, we rec­ommend General.

Source Language Select the source language from which you want to translate the texts in your source file. For more information, see Supported Languages [page 23].

Target Languages Select the target languages into which you want to translate the texts in the .properties file.

NoteTo improve performance, select only those target languages that you need.

230 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 231: SAP Translation Hub

Field Entry

Git Server Select Enterprise.

Git URL Enter the URL for your on-premise Git repository.

Examplehttps://myenterprise.corp/ShopApp/Resources

NoteThe URL must start with http:// or https://.

Branch By default, the branch is master. If you're using a different branch in the Git repository, change the entry as required.

Git Credentials If you want to save your Git credentials in SAP Translation Hub, choose Save. By entering the Git credentials, you can choose from possible .properties files in a dropdown on the trans­lation project UI and you do not have to enter your Git credentials each time you translate your translation project.

NoteSAP Translation Hub does not check the validity and correctness of Git credentials when you save them on the translation project UI. SAP Translation Hub checks the credentials only when you push translations to the Git repository.

Path to Properties File Enter or select the source .properties file of your application in the Git repository.

TipTo select the required .properties file from a dropdown, save your Git credentials.

Escape Non-ASCII Chars

Select to show machine-readable texts in your downloaded translations file. The file then con­tains Unicode escape sequences for non-ASCII characters ( \uxxxx). This is required only when your translations involve ISO-8859-1 encoding and you need to interpret the content.

If you do not select this option (default), the translated file contains human-readable text.

Keep Translations If you already translated the texts in your .properties file, for example, using a different translation provider to SAP Translation Hub, your application already contains translations in language-specific .properties files. You use the Keep Translations option to determine how SAP Translation Hub handles these existing translations:

○ If you want to keep the existing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application, choose Yes.

NoteWhen you use SAP Translation Hub to translate the texts in your .properties file, SAP Translation Hub stores the translations. If you use SAP Translation Hub to trans­late your .properties file a second or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous translation of the .properties file.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 231

Page 232: SAP Translation Hub

Field Entry

If you change any translations directly in the language-specific .properties files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ig­nores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Translation Hub.

○ If you want SAP Translation Hub to translate all the texts in your .properties file from scratch, and therefore overwrite any existing translations in your language-spe­cific .properties files, choose No.

Post-Editing Required Decide whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review proc­ess. If you enable this option, enable Review Required as well. For more information, see Man­aging Post-Editing and Review Steps.

Review Required Decide whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Use Company MLTR Decide whether you want to use a company MLTR that contains your own language data as the translation provider.

Select Company MLTR

If you decide to use a company MLTR, you need to select which one to use. You can select one company MLTR for each translation project. Only active company MLTRs are available for se­lection.

4. In the Project Configuration section, specify the editing and review requirements that you need for your translation project.

5. Choose Save.6. After the translation project has been saved, choose the required translation option in the bottom right of

the UI (Translate and Push or Translate Without Push).7. Enter your Git credentials. If required, you can save your credentials in SAP Translation Hub. If you choose

this option, you can update your credentials at a later point in time by editing the translation project.8. After the execution status changes to Completed successfully, you can view the translations on the

Translations tab.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Integrating Your Own Language Data [page 29]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]Translate Properties Files [page 233]

232 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 233: SAP Translation Hub

Update Translations in Properties Files [page 234]

9.4.2.4 Translate Properties Files

You use translation projects to translate .properties files, which are stored in a Git repository, as part of the translation workflow of SAP Translation Hub.

There is a translation project for the application that contains the .properties file that you want to translate.

On the SAP Translation Hub UI for translation projects, choose the translation project that refers to the .properties file to be translated, and choose one of the translation options in the bottom right of the screen:

What Do You Want to Do? Choose This Option Follow-On Tasks

Translate the texts in the .properties file and create .properties files for each target language in the Git reposi­tory; I don't want to review them first.

Translate and Push

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

The target language properties files al­ready exist in your Git repository, but you can still check the translations on the Translations tab.

Translate the texts and review them. Some texts are tricky, so I want to make sure that the translations are up to scratch before I push them to the Git re­pository.

In the context menu on the Translate and Push button, choose Translate Without Push.

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

Review the translations on the Translations tab. When you're satisfied with the translations, push them to the Git repository.

NoteTo verify that your .properties file has been translated and updated in your Git repository, view details in the Git repository browser.

For SAP Business Technology Platform, view the Git repository from the navigation area of the SAP Business Technology Platform cockpit. Choose Repositories Git Repositories and then choose the glasses icon in the row for the required Git repository.

The .properties file is translated into the target languages specified in the translation project. For more information, see the following sections.

Review Translations

If you want to view or change the translations in the project and see the translation provider for each text, choose the Translations tab.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 233

Page 234: SAP Translation Hub

View Quality of TranslationsThe quality index helps you to judge the quality of translations. The higher the number on a scale from 0-100, the better the quality. For more information, see Quality Index.

Updating Translations in Git RepositoryIf you change any of the translations, save your changes and push the changes to the Git repository manually.

Example

For an overview of how to translate a .properties file that you develop in SAP Web IDE and manage in the Git repository of SAP Business Technology Platform, check out the following video:

Related Information

Access UI for Translation Workflow Scenarios [page 195]Quality Index [page 16]

9.4.2.5 Update Translations in Properties Files

You can use the SAP Translation Hub UI to add or change translations created by SAP Translation Hub during the translation workflow.

You have used the translation workflow of SAP Translation Hub to translate the texts in the .properties file of an application.

When you use the translation workflow of SAP Translation Hub, SAP Translation Hub enters translations in .properties files for each target language. If required, you can create or update the texts in the .properties files for each target language.

1. On the SAP Translation Hub UI, choose the translation project that refers to the .properties files whose translations you want to update.

2. Choose the Translations tab.

SAP Translation Hub shows the languages defined in the translation project along with the source texts from the .properties file and the translations.

3. Choose the target language in which you would like to check or update translations.4. In the Translated Text column, update translations as required.

The translation provider is updated to show that you changed the text that SAP Translation Hub entered.5. Save your changes.

If you need to change the translations in other target languages, repeat the previous steps for each target language.

234 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 235: SAP Translation Hub

6. To add any translation changes to the .properties files in the Git repository, choose Push.

To view the .properties files in your development environment, for example, in SAP Web IDE, you must pull the latest changes from the Git repository.

Related Information

Access UI for Translation Workflow Scenarios [page 195]

9.4.3 Git Repository Hosted on the Web

SAP Translation Hub can connect to Git repositories hosted on the Web by third-party providers.

SAP Translation Hub can then pull the files for translation from the Web Git repository and push back the translated files.

The process comprises the following main steps:

1. You commit and push files to your Git repository.2. SAP Translation Hub reads the files in the Git repository.3. After SAP Translation Hub translates the texts, it pushes the translated files to the Git repository.4. You pull the changes in the Git repository to your development project.

The following graphic shows the main steps and parts of the scenario:

Related Information

Prerequisites for Git Repository Hosted on the Web [page 236]Create Translation Projects for Git Repository Hosted on the Web [page 236]

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 235

Page 236: SAP Translation Hub

9.4.3.1 Prerequisites for Git Repository Hosted on the Web

This section contains the prerequisites that must be met before you can use a Git repository that is hosted by a third-party Web host.

● You have account logon details for a Git repository hosted by a third-party Web host.● You have created a Git repository that is hosted by your Web host.

9.4.3.2 Create Translation Projects for Git Repository Hosted on the Web

Translation projects in SAP Translation Hub can be created with reference to a Git repository hosted by a third-party Web host.

See Prerequisites for Git Repository Hosted on the Web [page 236].

To translate source .properties files, SAP Translation Hub requires some details, such as the location of the source .properties file in the Git repository and the required target languages.

1. Call the UI for translation projects, as described in Access UI for Translation Workflow Scenarios.2. Create a translation project by choosing Git Project as the type.3. Enter the following data:

Field Entry

Project Name Enter a name that describes your translation project.

Domain Select the translation domain that most closely matches the business context of the applica­tion, such as Financials or Logistics.

TipIf you don't use domains or a similar concept and you're not sure what to select, we rec­ommend General.

Source Language Select the source language from which you want to translate the texts in your source file. For more information, see Supported Languages [page 23].

Target Languages Select the target languages into which you want to translate the texts in the .properties file.

NoteTo improve performance, select only those target languages that you need.

Git Server Select Web.

Git URL Enter the URL for the Git repository that you would like to use for your translation project.

NoteValid URLs are preceded by either http:// or https://. You must have an active user account linked with the Git URL.

236 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 237: SAP Translation Hub

Field Entry

Branch By default, the branch is master. If you're using a different branch in the Git repository, change the entry as required.

Git Credentials If you want to save your Git credentials in SAP Translation Hub, choose Save. By entering the Git credentials, you can choose from possible .properties files in a dropdown on the trans­lation project UI and you do not have to enter your Git credentials each time you translate your translation project.

NoteSAP Translation Hub does not check the validity and correctness of Git credentials when you save them on the translation project UI. SAP Translation Hub checks the credentials only when you push translations to the Git repository.

Path to Properties File Enter or select the source .properties file of your application in the Git repository.

TipTo select the required .properties file from a dropdown, save your Git credentials.

Escape Non-ASCII Chars

Select to show machine-readable texts in your downloaded translations file. The file then con­tains Unicode escape sequences for non-ASCII characters ( \uxxxx). This is required only when your translations involve ISO-8859-1 encoding and you need to interpret the content.

If you do not select this option (default), the translated file contains human-readable text.

Keep Translations If you already translated the texts in your .properties file, for example, using a different translation provider to SAP Translation Hub, your application already contains translations in language-specific .properties files. You use the Keep Translations option to determine how SAP Translation Hub handles these existing translations:

○ If you want to keep the existing translations and have SAP Translation Hub translate only those texts that do not yet have a translation in your application, choose Yes.

NoteWhen you use SAP Translation Hub to translate the texts in your .properties file, SAP Translation Hub stores the translations. If you use SAP Translation Hub to trans­late your .properties file a second or subsequent time and you add texts in the source language, SAP Translation Hub uses the same translations for the existing texts that it used during the previous translation of the .properties file.

If you change any translations directly in the language-specific .properties files in your Git project and then use SAP Translation Hub again, SAP Translation Hub ig­nores your translation changes. The translation changes from your Git project are lost.

To prevent SAP Translation Hub from overwriting any translations in your Git project, we recommend that you make all translation changes in SAP Translation Hub.

○ If you want SAP Translation Hub to translate all the texts in your .properties file from scratch, and therefore overwrite any existing translations in your language-spe­cific .properties files, choose No.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 237

Page 238: SAP Translation Hub

Field Entry

Post-Editing Required Decide whether you want to check translations using a two-step process. This option enables you to carry out a dedicated post-editing step before the review step. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review proc­ess. If you enable this option, enable Review Required as well. For more information, see Man­aging Post-Editing and Review Steps.

Review Required Decide whether you want to use at least one step to check translations. You can use the review step on its own or as part of a two-step process after post-editing. You use these steps and the corresponding lifecycle statuses for each text to manage the post-editing and review process. For more information, see Managing Post-Editing and Review Steps.

Use Company MLTR Decide whether you want to use a company MLTR that contains your own language data as the translation provider.

Select Company MLTR

If you decide to use a company MLTR, you need to select which one to use. You can select one company MLTR for each translation project. Only active company MLTRs are available for se­lection.

Four-Digit Target Files Select this option to create translated files with four-digit language codes, such as ja_JP or de_DE. If this option is not selected, then the translated files will be created with a two-digit language code, such as ja or de.

4. In the Project Configuration section, specify the editing and review requirements that you need for your translation project.

5. Choose Save.6. After the translation project has been saved, choose the required translation option in the bottom right of

the UI (Translate and Push or Translate Without Push).7. Enter your Git credentials. If required, you can save your credentials in SAP Translation Hub. If you choose

this option, you can update your credentials at a later point in time by editing the translation project.8. After the execution status changes to Completed successfully, you can view the translations on the

Translations tab.

Related Information

Access UI for Translation Workflow Scenarios [page 195]Integrating Your Own Language Data [page 29]Managing Post-Editing and Review Steps [page 241]Quality Index [page 16]Supported Languages [page 23]Translate Properties Files [page 239]Update Translations in Properties Files [page 240]

238 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 239: SAP Translation Hub

9.4.3.3 Translate Properties Files

You use translation projects to translate .properties files, which are stored in a Git repository, as part of the translation workflow of SAP Translation Hub.

There is a translation project for the application that contains the .properties file that you want to translate.

On the SAP Translation Hub UI for translation projects, choose the translation project that refers to the .properties file to be translated, and choose one of the translation options in the bottom right of the screen:

What Do You Want to Do? Choose This Option Follow-On Tasks

Translate the texts in the .properties file and create .properties files for each target language in the Git reposi­tory; I don't want to review them first.

Translate and Push

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

The target language properties files al­ready exist in your Git repository, but you can still check the translations on the Translations tab.

Translate the texts and review them. Some texts are tricky, so I want to make sure that the translations are up to scratch before I push them to the Git re­pository.

In the context menu on the Translate and Push button, choose Translate Without Push.

NoteWhen you choose this option, SAP Translation Hub pulls the latest ver­sion of the .properties file from the Git repository.

Review the translations on the Translations tab. When you're satisfied with the translations, push them to the Git repository.

NoteTo verify that your .properties file has been translated and updated in your Git repository, view details in the Git repository browser.

For SAP Business Technology Platform, view the Git repository from the navigation area of the SAP Business Technology Platform cockpit. Choose Repositories Git Repositories and then choose the glasses icon in the row for the required Git repository.

The .properties file is translated into the target languages specified in the translation project. For more information, see the following sections.

Review TranslationsIf you want to view or change the translations in the project and see the translation provider for each text, choose the Translations tab.

View Quality of TranslationsThe quality index helps you to judge the quality of translations. The higher the number on a scale from 0-100, the better the quality. For more information, see Quality Index.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 239

Page 240: SAP Translation Hub

Updating Translations in Git RepositoryIf you change any of the translations, save your changes and push the changes to the Git repository manually.

Example

For an overview of how to translate a .properties file that you develop in SAP Web IDE and manage in the Git repository of SAP Business Technology Platform, check out the following video:

Related Information

Access UI for Translation Workflow Scenarios [page 195]Quality Index [page 16]

9.4.3.4 Update Translations in Properties Files

You can use the SAP Translation Hub UI to add or change translations created by SAP Translation Hub during the translation workflow.

You have used the translation workflow of SAP Translation Hub to translate the texts in the .properties file of an application.

When you use the translation workflow of SAP Translation Hub, SAP Translation Hub enters translations in .properties files for each target language. If required, you can create or update the texts in the .properties files for each target language.

1. On the SAP Translation Hub UI, choose the translation project that refers to the .properties files whose translations you want to update.

2. Choose the Translations tab.

SAP Translation Hub shows the languages defined in the translation project along with the source texts from the .properties file and the translations.

3. Choose the target language in which you would like to check or update translations.4. In the Translated Text column, update translations as required.

The translation provider is updated to show that you changed the text that SAP Translation Hub entered.5. Save your changes.

If you need to change the translations in other target languages, repeat the previous steps for each target language.

6. To add any translation changes to the .properties files in the Git repository, choose Push.

To view the .properties files in your development environment, for example, in SAP Web IDE, you must pull the latest changes from the Git repository.

240 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 241: SAP Translation Hub

Related Information

Access UI for Translation Workflow Scenarios [page 195]

9.5 Managing Post-Editing and Review Steps

If you want to check and adjust the translations that SAP Translation Hub provides systematically, you can use different lifecycle statuses to manage the post-editing and review steps for each translation in a translation project.

To manage the post-editing and review process as flexibly as possible, no specific roles are required in SAP Translation Hub and there aren't any role-based UIs. Based on the setup and requirements in your organization, you can choose to skip the post-editing and review steps, use the steps individually, or combine them as part of a two-step process. For example, you can use the lifecycle statuses regardless of whether one person has numerous roles in your organization or you have dedicated people for the different roles.

Decision Table for Managing Post-Editing and Review Steps

What Roles Do You Have in Your Organization? Our Recommendation

We have specialists for each step in the process; we want the experts to sign off their part of the process.

Two-step process for separate post-editing and review steps.

One person does everything; we don't want to set specific statuses unnecessarily.

One-step process for combined post-editing and review steps.

We have only a few small translation projects and we don't want to have to set any statuses.

No special process; you don't see any special post-editing or review statuses.

The following video shows how to use the post-editing and review options:

Related Information

Configure Translation Projects [page 242]Use a One-Step Process [page 242]Use a Two-Step Process [page 243]Working with Translation Projects [page 245]

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 241

Page 242: SAP Translation Hub

9.5.1 Configure Translation Projects

When you create a translation project, you can decide how you want to manage the post-editing and review steps.

What Kind of Process Do You Want to Use? Configuration Setting What Does This Setting Mean?

No specific steps Do not select Post-Editing Required or Review Required.

It's business as usual; you don't see any special review or post-editing statuses in your translation project. The lifecycle status on text level and the project sta­tus show only whether texts have been translated by SAP Translation Hub.

One-step process Select Review Required. After SAP Translation Hub translates the texts in your translation project, the lifecycle status is In Review. When the person responsible for reviewing the translations is done, he or she com­pletes the review step by approving the translations.

Two-step process Select Post-Editing Required and Review Required.

After SAP Translation Hub translates the texts in your translation project, the first step is to post-edit texts. As the second and final step in the process, the reviewer approves the translations.

9.5.2 Use a One-Step Process

If you want to check the translations that SAP Translation Hub provides using a simple process, which requires only one status to be set, we recommend that you use the review step.

In the configuration settings for your translation project, you have specified that the review step is required. For more information, see Configure Translation Projects [page 242].

You use this process if one person completes the post-editing and review steps.

The lifecycle status for each translation in your translation project enables you to see at a glance which translations or source texts were added since the last time you translated the translation project.

SAP Translation Hub shows you whether you've reviewed all translations in your translation project by displaying an overall status in the top right of the translation project screens.

The following graphic shows the main steps in the process.

NoteEnsure you manually save your work frequently to ensure you don't lose your work.

242 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 243: SAP Translation Hub

1. SAP Translation Hub translates the texts in your translation project.2. To review the current lifecycle status of translations in your translation project, switch to the Translations

tab. You see the current lifecycle status for each translation and an overall status for the translation project in the top right of the translation project screen. For newly translated texts, the lifecycle status for each translation is In Review and the status of the translation project is Review in Progress.To make it easier to see which texts the reviewer needs to approve, we recommend that you filter the translations by the In Review lifecycle status.

3. The reviewer adjusts the translations as required and then approves the translations. It's possible to approve each translation individually or by selecting multiple texts on the current screen in the translation

project and choosing Approve: .4. To complete the review process, the reviewer saves the translation project. If all translations have been

approved and have the status Reviewed, the status of the translation project changes to Review Complete.5. Optional: If the reviewer or someone else changes a translation that has already been approved, SAP

Translation Hub resets the lifecycle status. To complete the process, any translation whose status was reset must be approved again.

9.5.3 Use a Two-Step Process

If you have multiple roles in your translation process, you can first assign someone to post-edit the translations that SAP Translation Hub provides. A dedicated reviewer can then approve the post-edited translations.

In the configuration settings for your translation project, you have specified that both post-editing and review steps are required. For more information, see Configure Translation Projects [page 242].

You use this process if you have dedicated post-editing and review steps in your translation process.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 243

Page 244: SAP Translation Hub

NoteAlthough each step has its own focus and corresponding lifecycle status, you use the same UI without role-based access for both steps.

The lifecycle status for each translation in a translation project enables you to see at a glance which translations have been reviewed or post-edited. The lifecycle status also enables you to determine which translations or source texts were added since the last time you translated the translation project.

SAP Translation Hub shows you whether you've reviewed or post-edited all translations in your translation project by displaying an overall status in the top right of the translation project screens.

NoteEnsure you manually save your work frequently to ensure you don't lose your work.

The following graphic shows the main steps in the process:

1. SAP Translation Hub translates the texts in your translation project.2. To review the current lifecycle status of translations in your translation project, switch to the Translations

tab. You see the current lifecycle status for each translation and an overall status for the translation project in the top right of the translation project screen. For newly translated texts, the lifecycle status for each translation is In Post-Editing and the status of the translation project is Translation in Progress.To make it easier to see which texts the post-editor needs to check, we recommend that you filter translations by the In Post-Editing lifecycle status.

3. The post-editor checks the translations and confirms that he or she has finished post-editing. It's possible to confirm the post-editing step for each translation individually or by selecting multiple texts on the current screen in the translation project and choosing Finish Post-Edit:

244 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 245: SAP Translation Hub

4. The post-editor saves the translation project. If all translations in the translation project have the status In Review, the status of the translation project changes from Translation in Progress to Review in Progress.

5. The reviewer checks the post-edited translations.To make it easier to see which texts the reviewer needs to check, we recommend that the reviewer filters the translations by the In Review lifecycle status.

6. Optional: If the reviewer wants the post-editor to repeat the post-editing step, the reviewer selects the corresponding entries and chooses Send Back for Post-Editing:

This step resets the lifecycle status to In Post-Editing, after which the post-editor must again confirm that post-editing is complete by choosing Finish Post-Edit.

7. The reviewer approves the post-edited translations. It's possible to approve each translation individually or by selecting multiple texts on the current screen in the translation project and choosing Approve:

8. To complete the two-step process, the reviewer saves the translation project. If all translations have been approved and have the status Reviewed, the status of the translation project changes to Review Complete.

9. Optional: If the reviewer or someone else changes a translation that has already been approved and then saves the translation project, SAP Translation Hub resets the lifecycle status to In Post-Editing, and the process starts from the beginning.

9.6 Working with Translation Projects

This document describes the different parts of the translation project UI and the situations that you might encounter when working with translation projects.

Header Section

The header section includes the following information:

● A status for the translation project as a wholeThis status relates to all translations and all target languages in a translation project. For example, if you are still reviewing the translations for one target language, the overall project status reflects the status of that target language. Only when you set a particular status for all translations in all languages and you save the translation project does the status on project level change.

● The number of translations in each target language

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 245

Page 246: SAP Translation Hub

Translations Tab

After your texts have been translated, SAP Translation Hub shows the translations for each required target language on the Translations tab. The following features make it easier to review translations.

Filter, Sort, and Multiple Selection● You can view the number of translations for each lifecycle status, such as In Post-Editing or Reviewed, and

the sequence of lifecycle statuses.By choosing the buttons for lifecycle statuses, you can filter the translations by a given lifecycle status.

● You can filter the translations based on the quality index or translation provider and sort the result by using the options available at the top right corner of the screen.

● To change the lifecycle status of multiple translations at once, use the checkboxes at the left of each row. If you select at least one row, the status action buttons (such as Approve or Send Back for Post-Editing) at the bottom of the UI become active.

● The Add New Project is available to include any ABAP, GIT or File project.● You have the option to delete a project using Delete Project button.

NoteOnce you have deleted a project, you can't retrieve or restore it anymore.

● The Action button available against each projects can be used to access the following:○ Details: Project details such as account in which it is created, processor who created the project,

status of the project, domain, source language and target language. In advanced setting the system displays the company MLTR, post-editing and review options.

○ Source Files: You can view all the source files that were uploaded requiring translations.○ Translations: You can view the translated texts of uploaded source texts in all the target languages,

along with translation provider and quality index of the translated text.○ Executions: You can view the execution log details of the project.

Additional Information on Text LevelTo enable translators and the people who review translations to get as much information as possible about the texts, you can see the following attributes:

NoteThe attributes appear only if they exist in the source file or development environment.

● The text type, such as XFLD for a field label● Context information about each text in the form of comments that developers enter in their development

environment● The maximum number of characters that each translated text can have; if you enter a translation that

exceeds this number of characters, a message appears under the translated text in question

246 PUBLICSAP Translation Hub

End-User Guide:Translation Workflow Scenarios

Page 247: SAP Translation Hub

Messages and Special Behavior in Translation Projects

The following table highlights some of the situations that you might experience when working with translation projects in SAP Translation Hub.

Situation Explanation

I have changed some translations, but when I save my changes, I get an error message stating that further changes are not possible. Why can't I save my changes?

This situation occurs when two translators are making changes to the same text in the same language at the same time. It is the result of a locking process that SAP Translation Hub uses to ensure the integrity of translations in the data­base.

This matter occurs rarely, but if you work with other transla­tors for the same language, consider planning your activities to avoid the locking mechanism taking effect.

I see strange codes (preceded by \u) in my translated file. What do they mean?

These codes are Unicode escape sequences, and appear be­cause you selected the Escape Non-ASCII characters option when you created your translation project.

To avoid seeing these codes, change the Escape Non-ASCII characters option for your current translation project, and download the translated file again. The codes will no longer be visible in your translated file.

I'm creating an ABAP translation project, but instead of see­ing an ABAP system in the dropdown, I see System Configured on Subscription Level. Which system is this?

This description means that the RFC destination for an ABAP system was created on subscription level, not on sub­account level. Although we recommend that you create RFC destinations on subaccount level, existing RFC connections created on subaccount level still work.

For more information, see SAP Business Technology Plat­form Cockpit [page 204].

In my ABAP translation project, I see the lifecycle status Not Applicable. What does the status mean?

The Not Applicable status appears when the target language in your translation project is the same as the original lan­guage of the texts. Since it is not possible to edit any texts in their original language in SAP Translation Hub, a special sta­tus is required. Furthermore, the text in the Translated Text column is grayed out and cannot be edited.

SAP Translation HubEnd-User Guide:Translation Workflow Scenarios PUBLIC 247

Page 248: SAP Translation Hub

10 Security

10.1 Document History

Version Date Change

1.1 2018-11-30 The quality estimation (QE) component and related authorizations and communication channels have been replaced by a simple quality index. If SAP Machine Translation provides translations, the quality index is set to a constant value that indicates that a human review of the text is recommended.

1.0 2017-06-26 Initial Version

10.2 Introduction

CautionThis guide does not replace the administration or operation guides that are available for productive operations.

Target Audience

● Technology consultants● Security consultants● System administrators

This document is not included as part of the installation guides, configuration guides, technical operation manuals, or upgrade guides. These guides are relevant only for a certain phase of the software life cycle, whereas a security guide provides information that is relevant for all life cycle phases.

248 PUBLICSAP Translation Hub

Security

Page 249: SAP Translation Hub

Why Is Security Necessary?

With the increasing use of distributed systems and the Internet for managing business data, the demands on security are also on the rise. When using a distributed system, you need to ensure that your data and processes support your business needs without allowing unauthorized access to critical information. User errors, negligence, or attempted manipulation of your system should not result in loss of information or processing time. These demands on security apply likewise to SAP Translation Hub. This security guide assists you in securing SAP Translation Hub.

About this Document

10.3 Before You Start

Fundamental Security Guides

SAP Translation Hub is built on SAP Business Technology Platform and as part of SAP NetWeaver. Therefore, the corresponding security guides also apply to SAP Translation Hub. Pay particular attention to the most relevant sections or specific restrictions as indicated in the following table:

Scenario, Application, or Component Security Guide

RFC/ICF Security Guide

SAP NetWeaver Security Guide

SAP Business Technology Platform Security Information

SAP Translation HubSecurity PUBLIC 249

Page 250: SAP Translation Hub

Important SAP Notes

The most important SAP Notes that apply to the security of SAP Translation Hub are shown in the following table:

Title SAP Note Comment

STH ABAP API 2349776 ABAP RFC layer for SAP Translation Hub

NoteFor a list of additional security-relevant news and SAP Notes, see SAP Security Notes & News at https://support.sap.com/en/my-support/knowledge-base/security-notes-news.html .

Additional Information

For more information about specific security topics, see the links in the following table:

Content Link

Security Community https://www.sap.com/community/topic/security.html

Related SAP Notes https://support.sap.com/en/my-support/knowledge-base.html and https://support.sap.com/en/my-support/knowledge-base/security-notes-news.html

Released platforms https://support.sap.com/en/release-upgrade-mainte­nance.html#section_1969201630

SAP Solution Manager https://support.sap.com/en/solution-manager.html

SAP NetWeaver Technology Community https://www.sap.com/community/topic/netweaver.html

10.4 Technical System Landscape

This section comprises the main components in SAP Translation Hub.

The following diagram shows an overview of the technical system landscape for SAP Translation Hub.

250 PUBLICSAP Translation Hub

Security

Page 251: SAP Translation Hub

SAP Translation Hub combines all translations in a cloud-based solution on SAP Business Technology Platform by using an SAP HANA database to increase speed and reduce costs in global roll-outs.

The central multilingual approach, which stores source texts and all corresponding translations together, we can semi-automate the reuse of all existing SAP product languages.

With SAP Translation Hub, you can translate Git content, files that you can upload, and texts in a customer’s on-premise ABAP system.

SAP Translation Hub also comprises a suggestion service that is integrated in SAP Web IDE.

Translation Service

The translation service provides translations of short texts based on existing texts and their translations that are used in SAP products. The service looks for suitable translations in the following places:

1. Company multilingual text repository (company MLTR)2. SAP multilingual text repository (MLTR)3. SAP machine translation (SAP MT) based on Moses open source toolkit

Each record in the multilingual text repository comprises the source language in English plus translations for a combination of domain and text type, which you can enter as additional request parameters.

Suggestion Service

Provides suggestions for short texts in English based on complete or partial texts and their translations used in SAP products. You can, for example, use the suggestion service to propose texts while you type in a development environment. The texts that the service proposes are already available in additional languages in the multilingual text repository.

SAP Translation HubSecurity PUBLIC 251

Page 252: SAP Translation Hub

Translation Workflow Scenarios

The following steps are performed:

1. Read the translation project.2. Get translations from the following sequence of translation providers: (to be customizable)

1. Company multilingual text repository (company MLTR)2. SAP Translation Hub's multilingual text repository (SAP MLTR)3. SAP machine translation solution (SAP MT)

3. Generate the corresponding translations in the source repository or in an export file.

Machine Translation Back End

In addition to the translations stored in the SAP HANA database (SAP MLTR), SAP Translation Hub can also retrieve proposals from a machine translation back end.

The back end is in the SAP Intranet (Zone3) and connected with a Cloud Connector (SAP HANA Enterprise Cloud) to SAP Business Technology Platform.

Several UIMA pipelines parallelize the calls to the Moses server.

Moses is a statistical machine translation system that can be used to automatically train translation models for any language pair. With the trained models and available algorithms Moses finds the best translation.

Conversion Service

A common issue during software translation is the storage and handling of the source files and translations. Most often every repository and/or development infrastructure handles translatable texts different. The conversion service helps to overcome these issues and provides a service that converts source files, such as .properties files, in a format that can be translated more easily (XLIFF 1.2) and also reconverts the translated file back to the source format.

ABAP RFC Layer

The ABAP RFC layer is deployed in a customer’s SAP NetWeaver ABAP system. The RFC layer acts as a wrapper to access ABAP source texts from SAP Business Technology Platform and to write the translated texts back to the ABAP system.

The communication is secured through the Cloud Connector, which is installed in a customer’s intranet.

The Cloud Connector communicates with a customer’s subscription of SAP Translation Hub on SAP Business Technology Platform. You use destinations to configure the Cloud Connector.

252 PUBLICSAP Translation Hub

Security

Page 253: SAP Translation Hub

The core SAP Translation Hub services are called from the UI. The services invoke the ABAP client to communicate with a customer's system and the XS importer service to import the ABAP texts to the SAP HANA database.

Integration of Your Own Language Data

You can upload your own translations and terminology to SAP Translation Hub based on object lists in on-premise ABAP systems or using XLIFF files. The function accepts XLIFF 1.2 files with SAP-specific metadata.

To use this feature, customers create a multilingual text repository known as a company MLTR, which is considered in the retrieval algorithms to provide the best translation for a given text.

Related Information

SAP Business Technology Platform DocumentationTechnical Landscape DesignSecurity Community

10.5 Security Aspects of Data, Data Flow, and Processes

The following figure shows an overview of the data flow for SAP Translation Hub.

SAP Translation HubSecurity PUBLIC 253

Page 254: SAP Translation Hub

The table below shows the security aspect to be considered for the process step and which security measure applies in each case.

Step Description Security Measure

1 SAP Translation Hub core accesses source texts from Git repository/ABAP system

User types: Technical user accesses the repositories. In the ABAP scenario, ex­plicit authorizations are needed.

The communication protocol is HTTPS for Git and RFC for ABAP.

2 SAP Translation Hub core to conversion service

HTTPS. Input validation used.

3 SAP Translation Hub core to translation Service

HTTPS.

4 SAP Translation Hub core to machine translation

OAuth authorization, HTTPS.

5 SAP Translation Hub core to post-edit­ing user interface

Input validation.

6 SAP Translation Hub to SAP HANA da­tabase

Not applicable.

7 SAP Translation Hub stores target texts in Git repository/ABAP system

User types: Technical user accesses the repositories. In the ABAP scenario, ex­plicit authorizations are needed.

The communication protocol is HTTPS for Git and RFC for ABAP.

The following figure shows an overview of the data flow for the integration of your own language data in SAP Translation Hub based on the XLIFF file upload option.

254 PUBLICSAP Translation Hub

Security

Page 255: SAP Translation Hub

10.5.1 User Administration and Authentication

SAP Translation Hub uses SAP Business Technology Platform Identity Authentication service. Therefore, the security recommendations and guidelines for SAP Business Technology Platform apply as well.

SAP Translation HubSecurity PUBLIC 255

Page 256: SAP Translation Hub

In addition to these guidelines, we include information about user administration and authentication that specifically applies to SAP Translation Hub in the topics in this section.

Related Information

User Management for SAP Business Technology Platform [page 256]User Management for RFC Layer [page 258]User Management for Machine Translation Back End [page 260]User Management for Integration of Language Data [page 260]User Data Synchronization [page 261]Integration into Single Sign-On Environments [page 261]

10.5.1.1 User Management for SAP Business Technology Platform

Use

User management for SAP Translation Hub uses the mechanisms provided with the SAP Business Technology Platform Identity Authentication service for users in the SAP Business Technology Platform. For the SAP HANA XS services, SAP Translation Hub uses the user and role management of the XS back end. For an overview of how these mechanisms apply to SAP Translation Hub, see the sections below. In addition, we provide a list of the standard users required for operating SAP Translation Hub.

User Administration Tools

The following table shows the tools to use for user management and user administration with SAP Translation Hub.

Tool Detailed Description Prerequisites

SAP Business Technology Platform Identity Authentication service

User and Role Administration Registered user on SAP Business Tech­nology Platform

SAP HANA XS database user manage­ment

Database user and role management None.

256 PUBLICSAP Translation Hub

Security

Page 257: SAP Translation Hub

User Types

It is often necessary to specify different security policies for different types of users. For example, your policy may specify that individual users who perform tasks interactively have to change their passwords on a regular basis, but not those users who run background processing jobs.

The user types that are required for SAP Translation Hub include:

● Users in SAP Business Technology Platform○ SAP Translation Hub Core

○ Developer (specific to SAP Business Technology Platform)○ Admin (specific to SAP Business Technology Platform)○ User (application-specific)

○ Integration of own language data○ User (application-specific)

● SAP HANA XS○ SAP Translation Hub core

○ Developer (translsvcDev)○ Read-only (translsvcREADONLY)○ User (translsvcUSER)

Standard Users

The following table shows the standard users that are necessary to use SAP Translation Hub.

System User ID Type Password Description

SAP Business Technol­ogy Platform

Developer Developer SAP Business Technol­ogy Platform Identity Authentication service

Specific to SAP Busi­ness Technology Plat­form for provider ac­count.

SAP Business Technol­ogy Platform

Admin Admin SAP Business Technol­ogy Platform Identity Authentication service

Specific to SAP Busi­ness Technology Plat­form for provider ac­count.

SAP Business Technol­ogy Platform

READONLY Read-Only SAP Business Technol­ogy Platform Identity Authentication service

Specific to SAP Busi­ness Technology Plat­form for application.

SAP Business Technol­ogy Platform

User (own language data)

User SAP Business Technol­ogy Platform Identity Authentication service

Specific to SAP Busi­ness Technology Plat­form for application.

SAP Translation HubSecurity PUBLIC 257

Page 258: SAP Translation Hub

System User ID Type Password Description

XS back end Developer Database user DB management translsvcDev

sap.translsvc.xsServi­ces:Full

sap.translsvc.xpra:Full

sap.translsvc:Full

sap.hana.xs.ad­min.roles:JobAdminis­tator

sap.hana.xs.ad­min.roles:JobSchedu­lerAdministator

XS back end READONLY Database user DB management translsvcREADONLY

sap.hana.xs.ad­min.roles:JobAdminis­tator

sap.hana.xs.ad­min.roles:JobSchedu­lerAdministator

sap.translsvc.xsServi­ces:ReadOnly

XS back end USER Database user DB management translsvcUSER

sap.hana.xs.ad­min.roles:JobAdminis­tator

sap.hana.xs.ad­min.roles:JobSchedu­lerAdministator

sap.translsvc.xsServi­ces:Full

10.5.1.2 User Management for RFC Layer

Use

User management for the RFC Layer uses the mechanisms provided with the SAP NetWeaver Application Server ABAP, for example, tools, user types, and password policies. For an overview of how these mechanisms

258 PUBLICSAP Translation Hub

Security

Page 259: SAP Translation Hub

apply for the RFC Layer, see the sections below. In addition, we provide a list of the standard users required for operating SAP Translation Hub.

User Administration Tools

The following table shows the tools to manage and administer users for the RFC layer.

Tool Detailed Description

User and role maintenance with SAP NetWeaver AS ABAP (Transactions SU01, PFCG)

User and Role Administration of Application Server ABAP

User Types

It is often necessary to specify different security policies for different types of users. For example, your policy may specify that individual users who perform tasks interactively have to change their passwords on a regular basis, but not those users under which background processing jobs run.

The user types that are required for the RFC Layer include technical users, which are service users that read object lists and source texts, and write translations.

For more information about these user types, search for information about user types in the SAP NetWeaver AS ABAP Security Guide.

Standard Users

The following table shows the standard users that are required to operate the RFC layer.

System User ID Type Password Description

Customer's on-prem­ise SAP NetWeaver System

To be specified Service user The user ID and pass­word are stored in the RFC destination for the connection.

Technical user for con­nection to your on-premise ABAP system.

NoteYour must create the technical user in your on-premise ABAP system.

SAP Translation HubSecurity PUBLIC 259

Page 260: SAP Translation Hub

Related Information

SAP NetWeaver Guide FinderUser and Role Administration of Application Server ABAP

10.5.1.3 User Management for Machine Translation Back End

Use

The user and role for the machine translation back end is predefined in the application. Only the technical user identified via OAuth can use the HLT MT connector service in SAP Business Technology Platform to request machine translation output for a given input text.

User Types and Standard Users

The following table shows the standard users that are necessary for operating the machine translation back end

Standard Users

System User ID Type Password

Machine translation back end OAuth user Technical user OAuth token

10.5.1.4 User Management for Integration of Language Data

Use

The user and role for the integration of language data is predefined in the application. Only the technical user identified via OAuth can use the Customer Data Endpoint in the SAP Business Technology Platform.

260 PUBLICSAP Translation Hub

Security

Page 261: SAP Translation Hub

User Types and Standard Users

The following below shows the standard users that are necessary for integrating language data.

Standard Users

System User ID Type Password

Integration of language data (SAP Business Technology Platform)

OAuth user Technical user OAuth token

10.5.1.5 User Data Synchronization

Use

The SAP Business Technology Platform Identity Authentication service synchronizes data for users.

Technical users are not synchronized automatically. Due to the limited number of technical users, SAP Translation Hub manages the required users in SAP Business Technology Platform.

10.5.1.6 Integration into Single Sign-On Environments

Use

10.6 Authorizations

Use

SAP Translation Hub uses the authorization concept provided by SAP Business Technology Platform and the SAP HANA XS back-end system.

SAP Translation HubSecurity PUBLIC 261

Page 262: SAP Translation Hub

The SAP Translation Hub RFC layer uses the authorization concept provided by SAP NetWeaver AS ABAP or AS Java. Therefore, the recommendations and guidelines for authorizations as described in the SAP NetWeaver AS Security Guide ABAP also apply to the SAP Translation Hub RFC layer.

The SAP NetWeaver authorization concept is based on the assignment of authorizations to users based on roles. To maintain roles, use the profile generator (transaction PFCG) in SAP NetWeaver AS ABAP and the User Management Engine’s user administration console in SAP NetWeaver AS Java.

Related Information

Role Administration

10.6.1 Role and Authorization Concept for SAP Business Technology Platform

Standard Roles

The following table shows the standard roles that SAP Translation Hub uses.

Standard Roles

Role Description

Developer Developer (specific to SAP Business Technology Platform)

Admin Admin (specific to SAP Business Technology Platform)

User User (application-specific)

Users translate texts stored in one of the locations that SAP Translation Hub supports, such as the Git repository on SAP Business Technology Platform or an on-premise ABAP sys­tem. Users review the translations on the SAP Translation Hub UI before transferring the translations to the source re­pository.

User (integration of your own language data) User (application-specific)

Users upload translations that are specific to a customer's company or industry so that SAP Translation Hub can use these translations as the first choice translation provider.

262 PUBLICSAP Translation Hub

Security

Page 263: SAP Translation Hub

10.6.2 Role and Authorization Concept for SAP HANA XS Back End

Standard Roles

The following table shows the standard roles that SAP Translation Hub uses.

Standard Roles

Role Description

translsvcDev Developer

translsvcREADONLY Read-only

translsvcUser User

Standard Authorization Objects

The table below shows the security-relevant authorization objects that are used by the SAP HANA XS back end.

Standard Authorization Objects

Role Value

translsvcDev sap.translsvc.xsServices:Full

sap.translsvc.xpra:Full

sap.translsvc:Full

sap.hana.xs.admin.roles:JobAdministator

sap.hana.xs.admin.roles:JobSchedulerAdministator

translsvcREADONLY sap.hana.xs.admin.roles:JobAdministator

sap.hana.xs.admin.roles:JobSchedulerAdministator

sap.translsvc.xsServices:ReadOnly

translsvcUser sap.hana.xs.admin.roles:JobAdministator

sap.hana.xs.admin.roles:JobSchedulerAdministator

sap.translsvc.xsServices:Full

SAP Translation HubSecurity PUBLIC 263

Page 264: SAP Translation Hub

10.6.3 Role and Authorization Concept for Machine Translation Back End

Authentication is done at the entry point of the system at the HLT MT connector service running on SAP Business Technology Platform. Users with the role translation can use the system. Only a single user with that role exists. It’s the technical user authenticated by OAuth that SAP Translation Hub uses: 505eb27b-b830-3365-bd29-78bc73297a49.

End users are authenticated on the level of SAP Translation Hub, which is the only consumer of the HLT MT connector service.

10.6.4 Role and Authorization Concept for ABAP RFC

Standard Roles

The following table shows the standard authorizations that the technical user needs:

Role Description

Role for technical user (you must create this user) Technical user to connect to the ABAP back-end system

Standard Authorization Objects

The table below shows the security-relevant authorization objects that are used

Standard Authorization Objects

Authorization Object Field Value

S_RFC RFC_TYPE FUNC

RFC_NAME LXE_STH_GET_OBJECT_LISTS

LXE_STH_READ_OBJECT_LIST

LXE_STH_READ_TEXTS

LXE_STH_WRITE_TEXTS

ACTVT 16 (Execute)

S_RFC RFC_TYPE FUGR

264 PUBLICSAP Translation Hub

Security

Page 265: SAP Translation Hub

Authorization Object Field Value

RFC_NAME RFC1, SDIFRUNTIME, SG00, SRFC, SYST, SYSU,

ACTVT 16 (Execute)

S_ADMI_FCD TRNR Translation administration SLWA/SLWB

10.7 Session Security Protection

To increase security and prevent access to the SAP logon ticket and security session cookie(s), we recommend activating secure session management.

We also highly recommend using SSL to protect the network communications where these security-relevant cookies are transferred.

10.8 Network and Communication Security

This section describes the network connections and channels that SAP Translation Hub uses.

Related Information

Communication Channel Security [page 265]Network Security [page 270]Communication Destinations [page 273]

10.8.1 Communication Channel Security

Overall SAP Translation Hub

The following graphic shows an overview of the network and channels of SAP Translation Hub.

SAP Translation HubSecurity PUBLIC 265

Page 266: SAP Translation Hub

NoteThe table below contains an explanation of the numbers in the graphic.

The following table shows the communication channels that SAP Translation Hub uses, the protocol used for the connection, and the type of data that is transferred.

Connection ID (See Graphic Above) Source System

Destination

System

Protocol

(only one entry per ID possible)

Port (only one en­try per ID possi­ble) Comment

1 Browser Consumer ac­count on SAP Business Technol­ogy Platform

HTTPS 443 None.

2 Browser Provider account on SAP Business Technology Plat­form

HTTPS 443 None.

3 Translation work­flow

Machine transla­tion broker

HTTPS 443 Based on the sub­scription concept of SAP Business Technology Plat­form

4 SAP Translation Hub multitenant app

Suggestion service HTTPS 443 Routing from Java to XS

266 PUBLICSAP Translation Hub

Security

Page 267: SAP Translation Hub

Connection ID (See Graphic Above) Source System

Destination

System

Protocol

(only one entry per ID possible)

Port (only one en­try per ID possi­ble) Comment

5 SAP Translation Hub multitenant app

Translation service HTTPS 443 Routing from Java to XS

6 Provider account for SAP Web IDE

Suggestion service HTTPS 443 Based on the sub­scription concept of SAP Business Technology Plat­form

7 Translation work­flow Java

Translation work­flow XS

HTTPS 443 None.

8 Translation work­flow

Git HTTPS 443 None.

9 Customer sub­scription

Customer SAP NetWeaver ABAP system

RFC 33XX Through Cloud Connector

10 Translation work­flow

Machine transla­tion broker service

HTTPS 9443 Through Cloud Connector

11 SAP Business Technology Plat­form apps

Cloud Identity HTTPS 443 None.

12 Translation work­flow XS

SAP HANA data­base

Other: XSJS data­base access HTTPS

Not applicable. None.

13 Suggestion service SAP HANA data­base

Other: XSJS data­base access HTTPS

Not applicable. None.

14 Translation service SAP HANA data­base

Other XSJS data­base access HTTPS

Not applicable. None.

15 Translation work­flow Java

SAP HANA data­base

JDBC 30015 None.

16 SAP Translation Hub

Conversion service HTTPS 443 None.

SAP Translation HubSecurity PUBLIC 267

Page 268: SAP Translation Hub

Connection ID (See Graphic Above) Source System

Destination

System

Protocol

(only one entry per ID possible)

Port (only one en­try per ID possi­ble) Comment

17 Conversion service SAP HANA data­base

JDBC 30015 None.

18 Conversion service SAP Business Technology Plat­form Document Service

CMIS protocol Not applicable. None.

DIAG and RFC connections can be protected using Secure Network Communications (SNC). HTTP connections are protected using the Secure Sockets Layer (SSL) protocol. SOAP connections are protected with Web services security.

RecommendationWe strongly recommend using secure protocols (SSL, SNC) whenever possible.

For more information, see Transport Layer Security and Web Services Security in the SAP NetWeaver Security Guide.

Integration of Your Own Language Data

The following graphic shows an overview of the network and channels specific to the integration of your own language data in SAP Translation Hub.

268 PUBLICSAP Translation Hub

Security

Page 269: SAP Translation Hub

NoteThe table below contains an explanation of the numbers in the graphic.

The table below shows the communication channels, protocol, and type of data transferred when you integrate your language data in SAP Translation Hub.

SAP Translation HubSecurity PUBLIC 269

Page 270: SAP Translation Hub

Connection ID

Related Data Flow (See Graphic Above) Source System

Destination System

Protocol (only one entry per ID possible)

Port (only one entry per ID possible) Comment

1 1 Browser Consumer ac­count on SAP Business Tech­nology Platform

HTTPS 443 None.

2 2 SAP Business Technology Platform cus­tomer account UI

Provider ac­count on SAP Business Tech­nology Platform

HTTPS 443 None.

3 3 Import/Data Creator

Data handling in back-end layer

HTTPS 443 None.

4 4 Data Handling Back-End Layer

Document serv­ice

HTTPS 443 CMIS Protocol

5 5 Integration of your own lan­guage data

SAP Translation Hub

HTTPS 443 None.

6 6 Provider ac­count SAP Web IDE

SAP HANA DB JDBC 30015 None.

Related Information

SAP NetWeaver Guide Finder

10.8.2 Network Security

Use

For the parts that ate deployed on SAP Business Technology Platform, SAP Translation Hub relies on the network security of SAP Business Technology Platform.

The SAP machine translation back end resides in zone 3 and uses the Cloud Connector to connect to SAP Business Technology Platform.

270 PUBLICSAP Translation Hub

Security

Page 271: SAP Translation Hub

The following graphic shows an overview of the network topology for the machine translation parts of SAP Translation Hub.

NoteThe table below contains an explanation of the numbers in the graphic.

Ports

The following table describes the individual steps in the overview of the network topology on this page.

SAP Translation HubSecurity PUBLIC 271

Page 272: SAP Translation Hub

Connection ID (from Network Topology Graphic)

Source

SystemDestination Sys­tem

Protocol (only one entry per ID pos­sible)

Port (only one en­try per ID possi­ble) Comment

1 SAP Translation Hub

ID: STH

Machine Transla­tion Connector Service

ID: HLTCS

HTTPS 443 None.

2 Machine Transla­tion Connector Service

ID: HLTCS

Cloud Connector

ID: CC

HTTPS Other: 9443 None.

3 Cloud Connector

ID: CC

Load Balancer

ID: LOAD

HLT Broker Serv­ice

ID: HLTBS

HTTPS Other: 9443 This connection physically goes through the load balancer which transparently dis­tributes the re­quests between the two HLTBS in­stances.

3' Load Balancer

ID: LOAD

Machine Transla­tion Broker Service

ID: HLTBS

HTTPS Other: 9443 Note that this con­nection “enters” the Zone 3 Net­work. All commu­nication hereafter is inside of the Zone 3 Network.

4 Machine Transla­tion Broker Service

ID: HLTBS

UIMA-AS active­MQBroker ID: UI­MAAS

HTTP Other: 8080 Communication happens locally on Machine

5 UIMA Pipeline(s)

ID: UIMAP

UIMA AS

ID: UIMAAS

Other: TCP Other: dynamic None.

6 UIMA Pipeline(s)

ID: UIMAP

Moses Server

ID: MOSES

Other: XML-RPC Other: dynamic Communication happens locally on Machine

7 <HLTBS> Q_files shared NFS storage

ID: QFILES

Other: NFS Other: 111 and 2049

None.

272 PUBLICSAP Translation Hub

Security

Page 273: SAP Translation Hub

Connection ID (from Network Topology Graphic)

Source

SystemDestination Sys­tem

Protocol (only one entry per ID pos­sible)

Port (only one en­try per ID possi­ble) Comment

8 <UIMAP> Q_files shared NFS storage

ID: QFILES

Other: NFS Other: 111 and 2049

None.

9 Admin User (inside SAP employee net­work)

All on-premise ma­chine translation systems

Other:SSH Other:22 The administrative user can access the root account of all On-Premise VMs via SSH (us­ing their global user).

10 Machine Transla­tion Service on SAP Leonardo Ma­chine Learning Foundation

Cloud Connector

ID: CC

HTTPS Other: 9443 None.

10.8.3 Communication Destinations

Use

The following destinations in SAP Business Technology Platform are necessary for productive usage.

10.8.3.1 converterMS

Connection to the conversion service with basic authentication and the Internet proxy type.

10.8.3.2 Git

Connection to the Git repository on SAP Business Technology Platform with no authentication and the Internet proxy type.

SAP Translation HubSecurity PUBLIC 273

Page 274: SAP Translation Hub

10.8.3.3 SAP Business Technology Platform Metering

Connection to the SAP Business Technology Platform metering service with InternalSystemAuthentication and the Internet proxy type.

10.8.3.4 ABAP Translation Back End

Connection to an ABAP translation system as part of the ABAP workflow scenario with jCo parameters client, mshost, and r3name.

10.8.3.5 XS Back End

Connection to the XS back end with basic authentication and the Internet proxy type.

10.9 Application-Specific Virus Scan Profile (ABAP)

The SAP Translation Hub RFC layer makes use of the SAP RFC protocol only, therefore no virus scanner is required for the ABAP part.

10.10 Data Storage Security

Data is stored in the following locations and secured by the means mentioned in each section.

10.10.1 SAP HANA Database

SAP Translation Hub stores translations, log files, project metadata, and customer translations in a dedicated SAP HANA database.

Translations are loaded during a specific loading process and transported using Smart Data Access to the test and production systems.

Log files are written when you execute business functions.

Customer translations and project metadata are stored during the translation workflow scenarios.

274 PUBLICSAP Translation Hub

Security

Page 275: SAP Translation Hub

SAP Translation Hub relies on the database-management system (DBMS) and the specific roles to restrict data access where necessary.

10.10.2 SAP Business Technology Platform

Git repositories are cloned to a temporary folder that is connected to SAP Business Technology Platform. SAP Translation Hub ensures that the data can be accessed only as a technical process within the application.

No user can access the data directly.

10.10.3 Customer ABAP System

After SAP Translation Hub translates the content of object lists in your on-premise ABAP system, confirmed translations are stored in the ABAP system.

The data is protected by standard SAP NetWeaver functions.

10.10.4 Data Protection and Privacy

Governments place legal requirements on industry to protect data and privacy. We provide features and functions to help you meet these requirements.

NoteSAP does not provide legal advice in any form. SAP software supports data protection compliance by providing security features and data protection-relevant functions, such as blocking and deletion of personal data. In many cases, compliance with applicable data protection and privacy laws is not covered by a product feature. Furthermore, this information should not be taken as advice or a recommendation regarding additional features that would be required in specific IT environments. Decisions related to data protection must be made on a case-by-case basis, taking into consideration the given system landscape and the applicable legal requirements. Definitions and other terms used in this documentation are not taken from a specific legal source.

Data protection is associated with numerous legal requirements and privacy concerns. In addition to compliance with general data privacy acts, it is necessary to consider compliance with industry-specific legislation in different countries. This section describes the specific features and functions that SAP provides to support compliance with the relevant legal requirements and data privacy.

This section and any other sections in this security guide do not give any advice on whether these features and functions are the best method to support company, industry, regional or country-specific requirements. Furthermore, this guide does not give any advice or recommendations with regard to additional features that would be required in a particular environment; decisions related to data protection must be made on a case-by-case basis and under consideration of the given system landscape and the applicable legal requirements.

Some basic requirements that support data protection are often referred to as technical and organizational measures (TOM). The following topics are related to data protection and require appropriate TOMs:

SAP Translation HubSecurity PUBLIC 275

Page 276: SAP Translation Hub

Topic More Information

Access control User Administration and Authentication [page 255]

Authorizations Authorizations [page 261]

Transmission control and communication security Network and Communication Security [page 265] and Se­curity Aspects of Data, Data Flow, and Processes [page 253]

Availability control Data Storage Security [page 274]

Separation by purpose Subject to the organizational model implemented and must be applied as part of the authorization concept.

CautionThe extent to which data protection is ensured depends on secure system operation. Network security, security note implementation, adequate logging of system changes, and appropriate usage of the system are the basic technical requirements for compliance with data privacy legislation and other legislation.

10.10.4.1 Glossary

The following terms are general to SAP products. Not all terms may be relevant for this SAP product.

Term Definition

Blocking A method of restricting access to data for which the primary business purpose has ended.

Business purpose The legal, contractual, or in other form justified reason for the processing of personal data to complete an end-to-end business process. The personal data used to complete the process is predefined in a purpose, which is defined by the data controller. The process must be defined before the per­sonal data required to fulfill the purpose can be determined.

Consent The action of the data subject confirming that the usage of his or her personal data shall be allowed for a given purpose. A consent functionality allows the storage of a consent re­cord in relation to a specific purpose and shows if a data subject has granted, withdrawn, or denied consent.

Data subject An identified or identifiable natural person, defined in rela­tion to applicable data protection legislation, for example, the EU GDPR.

Deletion Deletion of personal data so that the data is no longer avail­able.

End of business Defines the end of active business and the start of residence time and retention period.

276 PUBLICSAP Translation Hub

Security

Page 277: SAP Translation Hub

Term Definition

End of purpose (EoP) End of purpose and start of blocking period. The point in time when the primary processing purpose ends, for exam­ple, a contract is fulfilled.

End of purpose (EoP) check A method of identifying the point in time for a data set when the processing of personal data is no longer required for the primary business purpose. After the EoP has been reached, the data is blocked and can only be accessed by users with special authorization, for example, tax auditors.

Personal data Any information relating to an identified or identifiable natu­ral person (“data subject”), defined in relation to applicable data protection legislation, for example, the EU GDPR.

Purpose The information that specifies the reason and the goal for the processing of a specific set of personal data. As a rule, the purpose references the relevant legal basis for the proc­essing of personal data.

Residence period The period of time between the end of business and the end of purpose (EoP) for a data set during which the data re­mains in the database and can be used in case of subse­quent processes related to the original purpose. At the end of the longest configured residence period, the data is blocked or deleted. The residence period is part of the over­all retention period.

Retention period The period of time between the end of the last business ac­tivity involving a specific object (for example, a business partner) and the deletion of the corresponding data, subject to applicable laws. The retention period is a combination of the residence period and the blocking period.

Personal data A category of personal data that usually includes the follow­ing type of information:

● Special categories of personal data, such as data reveal­ing racial or ethnic origin, political opinions, religious or philosophical beliefs, trade union membership, genetic data, biometric data, data concerning health or sex life or sexual orientation.

● Personal data subject to professional secrecy● Personal data relating to criminal or administrative of­

fenses● Personal data concerning insurances and bank or credit

card accounts

SAP Translation HubSecurity PUBLIC 277

Page 278: SAP Translation Hub

Term Definition

Technical and organizational measures (TOM) Some basic requirements that support data protection and privacy are often referred to as technical and organizational measures (TOM). The following topics are related to data protection and privacy and require appropriate TOMs, for ex­ample:

● Access control: Authentication features● Authorizations: Authorization concept● Read access logging● Transmission control / Communication security● Input control / Change logging● Availability control● Separation by purpose: Is subject to the organizational

model implemented and must be applied as part of the authorization concept.

Where-used check (WUC) A process designed to ensure data integrity in the case of potential blocking of business partner data. An application's where-used check (WUC) determines if there is any depend­ent data for a certain business partner in the database. If de­pendent data exists, this means the data is still required for business activities. Therefore, the blocking of business part­ners referenced in the data is prevented.

10.10.4.2 Read-Access Logging

SAP Translation Hub does not store any personal data, therefore tools to monitor and log read access to personal data is not applicable.

SAP Translation Hub stores only the user name, user ID, and subaccount ID as part of the business requirement. This data is retrieved as part of read-only access by SAP Business Technology Platform Identity Authentication service.

10.10.4.3 Personal Data Record

SAP Translation Hub stores only the user name, user ID, and subaccount ID as part of the business requirement.

There are no functions to alter user names and other data. Values are retrieved as part of SAP Business Technology Platform and SAP Business Technology Platform Identity Authentication service tools.

278 PUBLICSAP Translation Hub

Security

Page 279: SAP Translation Hub

10.10.4.4 Change Log

SAP Translation Hub stores only the user name, user ID, and subaccount ID as part of the business requirement.

There are no functions to alter user names and other data. Values are retrieved as part of SAP Business Technology Platform and SAP Business Technology Platform Identity Authentication service tools.

10.10.4.5 User Consent

SAP Translation Hub stores only the user name, user ID, and subaccount ID as part of the business requirement.

There are no functions to alter user names and other data. Values are retrieved as part of SAP Business Technology Platform and SAP Business Technology Platform Identity Authentication service tools.

10.10.4.6 Translation of Personal Data

SAP Translation Hub is strictly not intended for translating personal data.

NoteIf you translate personal data intentionally, SAP is not responsible for any activities related to this matter and there is no read-access logging.

10.10.4.7 Deletion of Personal Data

Use

SAP Translation Hub might process data (personal data) that is subject to the data protection laws applicable in specific countries.

As a legal basis, SAP Translation Hub has a legitimate interest to store the user name of the translation and, for technical reasons, a clone of the customer's Git repository when you translate texts stored in a Git repository. Furthermore, SAP Translation Hub acts as a service provider.

Data subjects are business customers, partners, and employees. The first and last name of the translator that changes a translation in the post-editing user interface are currently stored for future reference.

SAP Translation HubSecurity PUBLIC 279

Page 280: SAP Translation Hub

The affected IT system is the SAP Business Technology Platform account and the physical location of the data is the SAP HANA database and the temporary attached storage to SAP Business Technology Platform for the Git clones.

Relevant Processes and Available Deletion Functionality

Process Detailed Description Deletion Functionality Deletion Process

Git cloning When you translate the con­tents of a Git repository, SAP Translation Hub connects to the Git repository and clones the complete Git repository to a temporary folder.

Although there are possibili­ties in Git to check out only files that match a certain file pattern, such as.properties files, this sparse checkout approach is not available in Eclipse for Git (EGit) or GJIT, and is not an option for SAP Translation Hub. For more information, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=383772 .

SAP Translation Hub must clone the complete Git repo­sitory to the local file share to get the files that need to be translated.

This step includes your own customer coding and user in­formation.

Access to this file share is possible only through the SAP Translation Hub conver­sion service. There is no di­rect file access possible for SAP Translation Hub users.

Manual deletion process af­ter 6 months.

1. You request the deletion of personal data by sending an e-mail to the SAP Translation Hub team (translation­[email protected])

NoteTo verify the origina­tor of the deletion request, the SAP Translation Hub team will call the ad­ministrator of the customer account to verify the origin and legitimacy of the request.

2. SAP Translation Hub starts the manual dele­tion process using rea­sonable database quer­ies for the relevant data centers and informs you after the data has been deleted successfully.

280 PUBLICSAP Translation Hub

Security

Page 281: SAP Translation Hub

Process Detailed Description Deletion Functionality Deletion Process

Post-editing SAP Translation Hub stores the first and last name of the translator that manually changes a translation on the post-editing user interface.

Manual deletion process af­ter 6 months.

1. You request the deletion of personal data by sending an e-mail to the SAP Translation Hub team (translation­[email protected])

NoteTo verify the origina­tor of the deletion request, the SAP Translation Hub team will call the ad­ministrator of the customer account to verify the origin and legitimacy of the request.

2. SAP Translation Hub starts the manual dele­tion process using rea­sonable database quer­ies for the relevant data centers and informs you after the data has been deleted successfully.

SAP Translation HubSecurity PUBLIC 281

Page 282: SAP Translation Hub

Process Detailed Description Deletion Functionality Deletion Process

Integration of your own lan­guage data

You integrate your own lan­guage data in SAP Transla­tion Hub by uploading trans­lations and terminology to SAP Translation Hub. For ad­ministrative purposes, SAP Translation Hub stores the user ID of the user who up­loads the data.

Manual deletion process af­ter 6 months.

1. You request the deletion of personal data by sending an e-mail to the SAP Translation Hub team (translation­[email protected])

NoteTo verify the origina­tor of the deletion request, the SAP Translation Hub team will call the ad­ministrator of the customer account to verify the origin and legitimacy of the request.

2. SAP Translation Hub starts the manual dele­tion process using rea­sonable database quer­ies for the relevant data centers and informs you after the data has been deleted successfully.

10.11 Security for Additional Applications

The following components are used in SAP Translation Hub. Since they are all SAP components, the security information for that product applies.

● SAP HANA DB 1.0● SAP Business Technology Platform● SAPUI5● SAP NetWeaver 7.4● SAP jConnect

TipYou can find the security information on http://help.sap.com.

282 PUBLICSAP Translation Hub

Security

Page 283: SAP Translation Hub

10.12 Dispensable Functions with Impacts on Security

Use

Only needed functions are delivered with SAP Translation Hub. Functions that are required only to train the machine translation engines have been removed from the scope to secure the application.

10.13 Other Security-Relevant Information

Bad HTML Formatting

In a typical translation workflow scenario, it is common to upload and translate source texts that contain HTML and XML markup. SAP Translation Hub cannot check poorly formatted HTML or XML markup.

It is the responsibility of the consumer to check that their HTML or XML markup is consistent.

SAP Translation HubSecurity PUBLIC 283

Page 284: SAP Translation Hub

10.14 Security-Relevant Logging and Tracing

This section describes the functions that the individual applications and components in SAP Translation Hub use to log and trace data.

10.14.1 SAP Business Technology Platform

SAP Translation Hub uses the built-in logging and tracing functions in SAP Business Technology Platform.

10.15 Services for Security Lifecycle Management

The following services are available from Active Global Support to assist you in maintaining security in your SAP systems on an ongoing basis.

Security Chapter in the EarlyWatch Alert (EWA) Report

This service regularly monitors the security chapter in the EarlyWatch Alert report of your system. It tells you the following:

● Whether SAP Security Notes have been identified as missing on your system.In this case, analyze and implement the identified SAP Notes if possible. If you cannot implement the SAP Notes, the report should be able to help you decide on how to handle the individual cases.

● Whether an accumulation of critical basis authorizations has been identified.In this case, verify whether the accumulation of critical basis authorizations is okay for your system. If not, correct the situation. If you consider the situation okay, you should still check for any significant changes compared to former EWA reports.

● Whether standard users with default passwords have been identified on your system.In this case, change the corresponding passwords to nondefault values.

Security Optimization Service (SOS)

The Security Optimization Service can be used for a more thorough security analysis of your system, including the following:

● Critical authorizations in detail● Security-relevant configuration parameters● Critical users● Missing security patches

284 PUBLICSAP Translation Hub

Security

Page 285: SAP Translation Hub

This service is available as a self-service within SAP Solution Manager, as a remote service, or as an on-site service.

RecommendationWe recommend that you use it regularly (for example, once a year) and in particular after significant system changes or in preparation for a system audit.

Security Configuration Validation

The Security Configuration Validation can be used to continuously monitor a system landscape for compliance with predefined settings, for example, from your company-specific SAP Security Policy. The validation primarily covers configuration parameters, but it also covers critical security properties like the existence of a nontrivial Gateway configuration or making sure standard users do not have default passwords.

Security in the RunSAP Methodology / Secure Operations Standard

With the end-to-end Solution Operations Standard Security service, a best practice recommendation is available on how to operate SAP systems and landscapes in a secure manner. It guides you through the most important security operation areas and links to detailed security information from SAP’s knowledge base wherever appropriate.

● EarlyWatch Alert● Security Optimization Service / Security Notes Report● Comprehensive list of Security Notes● RunSAP Roadmap, including the Security and the Secure Operations Standard

● Early Watch Alert

Related Information

Early Watch AlertSecurity Optimization Service / Security Notes ReportComprehensive list of Security NotesRunSAP Roadmap, including the Security and the Secure Operations Standard

SAP Translation HubSecurity PUBLIC 285

Page 286: SAP Translation Hub

11 Monitoring and Troubleshooting

While working with SAP Translation Hub, you might encounter some issues that others have already solved. To get to the bottom of your particular issue, check out the different options in the following sections.

Find out about planned - and unplanned - downtimes

If you want to receive e-mail notifications when the service is down for maintenance or something happens beyond our control, register at SAP Translation Hub Announcements .

Browse SAP Community

Check out our blogs and tutorials on SAP Community or browse our FAQ .

Check out SAP Jam

If you'd like to access a collection of materials about various aspects of the product and to ask questions, start discussions, or submit ideas, take a look at our dedicated SAP Jam group: SAP Translation Hub .

Create a customer incident

To track and manage issues following the standard SAP approach, please create a customer incident, as described in Getting Support. The component to use in the Provide Incident Details part of the process is SAP Translation Hub (LOD-TH).

NoteYou can create a customer incident only if you have an enterprise account. If you have a trial account, please mail us.

Mail us

If you prefer more direct communication, drop us a line at mailto:[email protected].

286 PUBLICSAP Translation Hub

Monitoring and Troubleshooting

Page 287: SAP Translation Hub

Important Disclaimers and Legal Information

HyperlinksSome links are classified by an icon and/or a mouseover text. These links provide additional information.About the icons:

● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your agreements with SAP) to this:

● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any

damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.

● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this information.

Videos Hosted on External PlatformsSome videos may point to third-party video hosting platforms. SAP cannot guarantee the future availability of videos stored on these platforms. Furthermore, any advertisements or other content hosted on these platforms (for example, suggested videos or by navigating to other videos hosted on the same site), are not within the control or responsibility of SAP.

Beta and Other Experimental FeaturesExperimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use the experimental features in a live operating environment or with data that has not been sufficiently backed up.The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

Example CodeAny software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of example code unless damages have been caused by SAP's gross negligence or willful misconduct.

Bias-Free LanguageSAP supports a culture of diversity and inclusion. Whenever possible, we use unbiased language in our documentation to refer to people of all cultures, ethnicities, genders, and abilities.

SAP Translation HubImportant Disclaimers and Legal Information PUBLIC 287

Page 288: SAP Translation Hub

www.sap.com/contactsap

© 2021 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.

Please see https://www.sap.com/about/legal/trademark.html for additional trademark information and notices.

THE BEST RUN