context
parameter, which makes it possible to provide additional context that can influence a translation result, but will not actually be translated itself.
You can learn more about the context
parameter in the text translation API reference.
Characters included in the context
parameter will not be counted toward billing (i.e. there is no additional cost for using the context
parameter, and only characters sent in the text
parameter(s) will be counted toward billing for text translation even when the context
parameter is included in a request).
text
Parameterstranslate
endpoint for text translation, it’s possible to send multiple text parameters in a single request.
The DeepL engine will only consider context in the scope of each individual text
parameter within an API request. Said another way, the engine will not consider the broader context across multiple text
parameters, even if these multiple text parameters are included in the same API request.
Therefore, if you want to ensure the translation engine can utilize context in your API requests, we recommend the following.
text
parameter, and if possible, do not split up a request into multiple text
parameters.
text
parameters within a single request, try to break up the text based on e.g. paragraphs or another logical “context boundary”, so that context in each text
parameter is as complete as possible.
tag_handling=xml
or tag_handling=html
in text translation, the translation engine will consider the broader context of sentences that are close to one another and will not use tags as a “context boundary”. That is, the engine can consider context “across” different tags within the XML or HTML snippet.
As mentioned above, the engine will only consider context in the scope of each individual text
parameter within a text translation request.
text
parameter, so that the engine can refer to the context from the product description when translating the product name and vice versa.