XML handling
Learn how to translate XML content with the DeepL API.
By default, the translation engine does not take tags into account. By setting the tag_handling
parameter to xml
, the API will process XML input by extracting the text out of the structure, splitting it into individual sentences, translating them, and placing them back into the XML structure.
For the translation of HTML content please see HTML Handling
Sentences with Markup
If you want to translate text where individual parts are marked up, you can simply activate the XML engine by setting tag_handling
to xml
. The following examples show marked-up text and how it will be translated:
Request
Response
In general, placeholders are associated with the words preceding or following them in the source sentence and are then applied to their respective translations in the target sentence.
Ignored Tags
To ensure that elements in the original text are not altered in translation (e.g. trademarks or product names), use the ignore_tags
parameter and specify a tag for this function.
Parameters
Request
Response
Last updated