Skip to Content

Translate Documents with SAP API Business Hub

Use your SAP BTP account to translate documents with SAP API Business Hub.
You will learn
  • How to get started with SAP API Business Hub
  • How to maintain the Document Translation credentials in SAP API Business Hub
  • How to translate a Document in SAP API Business Hub
beapaschBeatrice PaschMay 24, 2022
Created by
beapasch
December 6, 2020
Contributors
beapasch
beapasch
thecodester

Prerequisites

  • Step 1

    Follow the link to the SAP API Business Hub.

    API Hub
  • Step 2

    The SAP API Business Hub offers a test facility for APIs. In order to take advantage of this, you need to log on.

    Select Login at the top of the page.

    Log On
  • Step 3

    Search for document translation to find the Document Translation API and select the Document Translation API.

    Search in API Hub
  • Step 4

    The Document Translation API Reference page shows the two available APIs.

    Show document translation

    Take a minute to explore both APIs.

  • Step 5

    The service offers a sandbox system out of the box, but the idea of this tutorial is to show, how to connect your SAP BTP free tier or enterprise account to the SAP API Business Hub.

    1. Select the Try Out button.

      Configure
    2. Click Environment: Sandbox to open the menu and select + Add New Environment

      Configure
    3. In the Configure Environment screen, enter a display name for the environment: myaccountand select the Starting URL corresponding to the region of your SAP BTP account.

      Configure
    4. For client ID and client secret, take the information from the Document Translation credentials as described in Create Service Instance for Document Translation

      Configure
    5. For subaccount, take the subdomain information from your SAP Business Technology Platform cockpit. For example, on the screen-shot below, the sub-account is 80c353f5trial.

      Configure

      Enter your value in SAP Business API Hub.

      Configure
    6. Save your settings for future sessions.

      Configure
  • Step 6

    Now that your API environment is maintained, you will see the myaccount entry.

    Select Synchronous document translation and POST /translation.

    Configure
  • Step 7

    You can maintain the languages in the Parameters section. Source and Target Language fields are already pre-filled with values for English and German. If you want to try out other language codes, please refer to the available language information here.

    Configure
  • Step 8

    Go to the Body section and select Form Data.

    Choose File to select a document from your file source system (Microsoft Word, Microsoft PowerPoint, Microsoft Excel or other file formats which are mentioned here) and click Run.

    Configure
  • Step 9

    After some seconds you will see in the Response Body section a Download file link. Click the link and the translated file will be downloaded.

    Configure

    Open the file and verify the translation result.

    Configure

    Where do you enter the credentials for Document Translation?

Back to top