DeepsetDeepLDocumentTranslator Parameters

Check the init and runtime parameters you can pass for this component.

YAML Init Parameters

You can specify the following parameters for DeepsetDeepLDocumentTranslator in the pipeline YAML:

Parameter

Type

Possible values

Description

target_languages

List of strings

For a list of possible options, see DeepL documentation.

Codes of languages you want to translate your documents into.
Required.

source_language

String

Default: None

The language of the documents you want to translate. If None, it's automatically detected. For a list of possible options, see DeepL documentation.
Optional.

api_key

Secret

Default: Secret.from_env_var("DEEPL_API_TOKEN")

The DeepL API key.
Required.

preserve_formatting

Boolean

Default: True

Controls automatic formatting correction. When True, prevents automatic correction of formatting.
Optional

context

String

Default: None

Use this parameter to include additional context that can influence a translation without being translated itself. Providing additional context can potentially improve translation quality, especially for short, low-context source texts such as product names on an e-commerce website, article headlines on a news website, or UI elements. For details, see DeepL API documentation.
Optional.

formality

String

less
more
Default: None

Controls whether translations lean toward informal or formal language. This works only for target languages: German (DE), French (FR), Italian (IT), Spanish (ES), Dutch (NL), Polish (PL), Portugese (PT_BR and PT_PT), Japanese (JA), and Russian (RU). Possible values:

  • less: Uses more informal language
  • more: Uses more polite and formal language.
    Optional.

REST API Runtime Parameters

There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.