Learn how to translate HTML content with the DeepL API.
tag_handling
parameter to html
, the API will process HTML input by extracting the text out of the structure, splitting it into individual sentences, translating them, and placing them back into the HTML structure.
split_sentences
parameter for all requests where tag_handling=html
is nonewlines
, meaning the translation engine splits on punctuation only, ignoring newlines.
The default value split_sentences
for text translations where tag_handling
is not set to html
is 1
, meaning the translation engine splits on punctuation and on newlines.
Please note that for next-gen models, the parameter split_sentences
passed by the user is ignored and a value of nonewlines
is used for maximum translation quality.
translate="no"
and class="notranslate"
attributes. In the following example, the translate="no"
attribute is used to prevent translation of the paragraph: