Login to follow
DeepL

DeepL (ODC)

Stable version 1.2.0 (Compatible with ODC)
Uploaded on 05 February 2025 by Stefan Weber
DeepL

DeepL (ODC)

Documentation
1.2.0
Actions

The library exposes the following actions


GetAccountUsage


Retrieves account usage metrics of the DeepL account


Input parameters

  • authKey - DeepL API Key

Result

  • DeepLAccountUsage - Structure with usage metrics
TranslateText


Translate text to a specified and supported target language


Input parameters

  • authKey - DeepL API Key
  • texts - Array of texts to be translated. Each input array item results in one output array item of translated text.
  • sourceLang - Optional. The source language code of the input texts. See Deepl API Documentation for possible values.
  • targetLang - The target language to which the texts should be translated to. See Deepl API Documentation for possible values.
  • glossaryId - Optional. The identifier of a glossary to use during translation.
  • preserveFormatting - Sets whether the translation engine should respect the original formatting, even if it would usually correct some aspects.
  • formality - Sets whether the translated text should lean towards formal or informal language. Only works with some target languages.
  • tagHandling - Sets which kind of tags should be handled. Xml and Html supported.

Result

  • List of DeepLTextTranslation - List of DeepLTextTranslation structure with translated text and detected source language.
TranslateDocument

Translate a document to a specified and supported target language

  • authKey - DeepL API Key
  • inputFile - Binary data of the document to be translated.
  • inputFileName - Original filename of the document to be translated.
  • sourceLang - Optional. The source language code of the input texts. See Deepl API Documentation for possible values.
  • targetLang - The target language to which the texts should be translated to. See Deepl API Documentation for possible values.
  • glossaryId - Optional. The identifier of a glossary to use during translation.
  • formality - Sets whether the translated text should lean towards formal or informal language. Only works with some target languages.

Result

  • translatedDocument - Translated document binary data.

CreateGlossary


Create a new glossary

Input parameters

  • authKey - DeepL API Key
  • name - Name of the glossary
  • sourceLang - The language in which the source texts in the glossary are specified
  • targetLang - The language in which the target texts in the glossary are specified
  • entries - A structure with a source language entry and an associated target language entry

Result

  • glossaryInfo - A structure containing details of the created glossary
DeleteGlossary

Permanently deletes a glossary

Input parameters

  • authKey - DeepL API Key
  • glossaryId - Identifier of the glossary to delete
GetGlossaryDetails

Retrieve details of a glossary

Input parameters

  • authKey - DeepL API Key
  • glossaryId - Identifier of the glossary to delete

Result

  • glossaryInfo - A structure containing details of the requested glossary
GetGlossaryEntries

Retrieve the glossary entries of a glossary

Input parameters

  • authKey - DeepL API Key
  • glossaryId - Identifier of the glossary to delete

Result

  • glossaryEntries - List of glossary entries
ListGlossaries

Retrieve all glossaries in the account

Input parameters

  • authKey - DeepL API Key

Result

  • glossaries - List of glossary details
GetSourceLanguages

Returns supported languages as source

Input parameters

  • authKey - DeepL API Key

Result

  • sourceLanguages - List of available languages as source with language code and name
GetTargetLanguages

Returns supported languages as target

Input parameters

  • authKey - DeepL API Key

Result

  • targetLanguages - List of available languages as target with language code, name and support for formality option

Check the demo application on how to apply the features in your application.


Source code of external logic library is available here stefan-d-p/odc-deepl-library: DeepL SDK External Logic Library for OutSystems Developer Cloud (github.com)