Setting up automatic translation

This article describes how to configure the Conigma API for automatic translation for the translation service DeepL. This allows automatic translation of numerous texts (e.g. short descriptions of Conigma Changes) into freely configurable target languages. 

Requirements

In order to use automatic translation with DeepL, you will need a corresponding account with DeepL, which allows access to the DeepL API. For more information on this, please refer to the provider's website (https://www.deepl.com/pro#developer ).

Please note that fees may be charged for automatic translation by the service provider, in this case DeepL!

The API has a session cache for translation results. This prevents the same text being sent to the external translation service more than once.

Creating an API key

For the authentication at DeepL you need an authentication key (API Key). You can find (or generate) this key in your account settings at DeepL. To do so, open the page https://www.deepl.com in a browser, log in and then navigate to page https://www.deepl.com/pro-account.html?page=summary .

Configuration of the infrastructure

Network / Firewalls

To enable communication between Conigma and the translation service DeepL, an SAP application server must be technically capable of communicating with the servers of DeepL via HTTPS (port 443). Usually, communication is done via the Conigma central system, but any other SAP system from the system group managed by Conigma CCM can also perform this task. Make sure that the network configuration (router, firewall, etc.) allows this communication. On Unix/Linux servers you can use the command curl "https://www.deepl.com/translator " to check if communication is possible. On Windows based servers, communication can be checked by starting a browser on the server side and navigating to the URL https://www.deepl.com/translator .

Set up trusted certificates 

Next, the certificates used by the translation service DeepL must be set as trustworthy. Since the service uses two different certificates, both certificates of the URLs https://www.deepl.com/translator  and https://api.deepl.com/v1/translate?text=Test&source_lang=DE&target_lang=EN&auth_key=MY_API_KEY (replace MY_API_KEY with the API key of your DeepL account) must be trusted. The procedure for downloading the certificates varies between different browsers and operating systems. The following section describes the procedure for Chrome on Windows 10 as an example.

  1. Start Chrome and navigate to the desired URL

  2. Click on the security lock icon to the left of the URL and then click "Certificate (valid)"

  3. Switch to the "Details" tab in the certificate details that are now displayed and click on "Copy to file…"

  4. Now follow the instructions of the wizard to save the certificate to a file.

After you have performed these steps for both certificates, log on to the SAP system that is to handle communication with DeepL. Start transaction STRUST and switch to edit mode by pressing Ctrl+F1. Now double-click on the node "SSL client SSL Client (Anonymous)" in the tree on the left.

If a red X symbol is displayed to the left of this tree node, open the context menu for this node and choose the menu item "Create". In the following dialog, accept the default settings by clicking on the green tick.

Now proceed as follows for each of the two certificates:

  1. Click on "Import certificate" at the bottom left of the detail view

  2. Select the file containing the relevant certificate

  3. Click on "Add to Certificate List"

  4. Press Ctrl+S or click on the disk icon to save your changes

For more information about using transaction STRUST, refer to the SAP documentation.

Authentication

To authenticate with the translation service provider, you need to store your API Key in the system specific Conigma configuration. To do this, start transaction /GAL/CONFIG_EDITOR, navigate to the node Root -> Galileo Group AG -> Open Source Components -> Translation -> Providers -> DeepL -> API Key and double-click on this node.

Now switch to the "Values" tab in the right-hand area and click on "Change".

Now enter your API Key in the input area and then click on "Save". Then you can close the configuration editor.

Testing the infrastructure

To ensure that the infrastructure functions correctly, start transaction SE24, enter the class name /GAL/TRANSLATOR_DEEPL and press F8. A window with type mappings is now displayed.

Press the Enter key to accept the default values.

Now press F8 to create an instance of the class.

Now click on the symbol to the right of /GAL/IF_TRANSLATION_PROVIDER. Again, a window with type assignments is displayed.

Press the Enter key to accept the default values.

Now mark the checkbox in the second line and click on the execution symbol to the right of TRANSLATE.

Now enter the value "EN" in the input field next to SOURCE_LANGUAGE_ID and the value "DE" in the input field next to TARGET_LANGUAGE_ID. Please note that the entries are case-sensitive! Then enter any text to be translated in the input field next to INPUT and press F8.

If everything is configured correctly, the translated text should now be output in the field to the right of OUTPUT. If a window with an error message is displayed instead, an error has occurred during communication. In this case, use the trace file of the ICM monitor (transaction SMICM) to analyze the cause of the error. It may be necessary to increase the trace level accordingly.

For more information about using transaction SMICM, refer to the SAP documentation.


Configuring Conigma CCM

Now each system in the Conigma system group, managed by Conigma, needs to know which translation provider should be used and on which system it has been configured. To set this up, start the Conigma Repository Browser (transaction /GAL/CCM_RB). Make sure that your user is assigned Conigma user authorization (role /GAL/CCM_CONIGMA_USER) and Conigma administrator authorization (role /GAL/CCM_CONIGMA_ADMIN).

Within the desired repository, navigate to the path Configuration -> Infrastructure and Communication -> Systems and Clients. Proceed as follows for each system in which automatic translation is to be available:

  1. Double-click on the system object to display the relevant details

  2. Switch to the tab "System specific settings"

  3. Click on "Edit" in the toolbar at the bottom of the details area

  4. Find the entry "Class of translator to be used" and enter the value "/GAL/TRANSLATOR_DEEPL"

  5. Find the entry "RFC route for remote translator call" and enter the RFC route from the selected SAP system to the SAP system configured for translation. If the system currently selected already is the SAP system configured for translation, this field can remain empty. If the Conigma central system was configured for translation, the RFC destination from the currently selected system to the Conigma central system must be entered here. If a different system has been configured for translation, a semicolon-separated list of RFC destinations can be entered here, which are processed in sequence (e.g. the RFC destination from the currently selected system to the Conigma central system and the RFC destination from the Conigma central system to the SAP system configured for translation).

  6. Click on "Save" in the toolbar at the bottom of the detail area to save the changes

Finally, close the Conigma Repository Browser and restart it. The functions for automatic translation are now available.