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 settingtag_handling
to xml
. The following examples show marked-up text and how it will be translated:
Request
Response
Ignored Tags
Use theignore_tags
parameter to specify that content within specific tags should not be translated. The example below uses ignore_tags=x
to tell DeepL to preserve text between <x>
and </x>
tags as is.
Example: ignore \<x\> tag
Parameters
Request
Response