diff --git a/api-reference/document.mdx b/api-reference/document.mdx index 4a15569e..72787e8b 100644 --- a/api-reference/document.mdx +++ b/api-reference/document.mdx @@ -146,7 +146,7 @@ These examples are for demonstration purposes only. In production code, the auth The name of the uploaded file. Can be used as an alternative to including the file name in the file part's content disposition. - Sets whether the translated text should lean towards formal or informal language. This feature currently only works for target languages `DE` (German), `FR` (French), `IT` (Italian), `ES` (Spanish), `NL` (Dutch), `PL` (Polish), `PT-BR` and `PT-PT` (Portuguese), `JA` (Japanese), and `RU` (Russian). Learn more about the plain/polite feature for Japanese here. Setting this parameter with a target language that does not support formality will fail, unless one of the `prefer_...` options are used. Possible options are: + Sets whether the translated text should lean towards formal or informal language. This feature currently only works for target languages `DE` (German), `FR` (French), `IT` (Italian), `ES` (Spanish), `NL` (Dutch), `PL` (Polish), `PT-BR` and `PT-PT` (Portuguese), `JA` (Japanese), and `RU` (Russian). Learn more about the plain/polite feature for Japanese here. Setting this parameter with a target language that does not support formality will fail, unless one of the `prefer_...` options are used. To check formality support dynamically, call GET /v3/languages?resource=translate_document and look for the formality feature key on the target language. Possible options are: - A unique ID assigned to a glossary. + A unique ID assigned to a glossary. To check glossary support for a language pair, call GET /v3/languages?resource=translate_document and verify the glossary feature key is present on both the source and target language. File extension of desired format of translated file, for example: `pdf`. If unspecified, by default the translated file will be in the same format as the input file. diff --git a/api-reference/improve-text.mdx b/api-reference/improve-text.mdx index 0b9898c7..f9ab0eee 100644 --- a/api-reference/improve-text.mdx +++ b/api-reference/improve-text.mdx @@ -62,7 +62,7 @@ curl -X POST 'https://api.deepl.com/v2/write/rephrase' \ Text to be improved. Only UTF-8-encoded plain text is supported. Improvements are returned in the same order as they are requested. Each of the parameter values may contain multiple sentences. - The language of the improved text. A list of supported languages have not yet been added to the `/languages` endpoint. Currently, the following languages are supported: + The language of the improved text. You can also retrieve supported languages programmatically via GET /v3/languages?resource=write. Currently, the following languages are supported: * `de` (German) * `en-GB` (British English) @@ -110,7 +110,7 @@ curl -X POST 'https://api.deepl.com/v2/write/rephrase' \ Styles prefixed with `prefer_` will fall back to the `default` style when used with a language that does not support styles (this is recommended for cases where no `target_lang` is set), the non-prefixed writing styles (except `default`) will return a HTTP 400 error in that case. - It’s not possible to include both `writing_style` and `tone` in a request; only one or the other can be included. + It’s not possible to include both `writing_style` and `tone` in a request; only one or the other can be included. To check writing style support dynamically, call GET /v3/languages?resource=write and look for the writing_style feature key on the target language. Changes the tone of your improvements. @@ -142,7 +142,7 @@ curl -X POST 'https://api.deepl.com/v2/write/rephrase' \ Tones prefixed with `prefer_` will fall back to the `default` tone when used with a language that does not support tones (this is recommended for cases where no `target_lang` is set), the non-prefixed tones (except `default`) will return a HTTP 400 error in that case. - It’s not possible to include both `writing_style` and `tone` in a request; only one or the other can be included. + It’s not possible to include both `writing_style` and `tone` in a request; only one or the other can be included. To check tone support dynamically, call GET /v3/languages?resource=write and look for the tone feature key on the target language. ### Response body descriptions diff --git a/api-reference/multilingual-glossaries.mdx b/api-reference/multilingual-glossaries.mdx index 2070b79b..3df3005d 100644 --- a/api-reference/multilingual-glossaries.mdx +++ b/api-reference/multilingual-glossaries.mdx @@ -16,7 +16,7 @@ description: "Manage and use DeepL glossaries" ## Overview -The `glossaries` endpoints let you work with [DeepL glossaries](https://support.deepl.com/hc/en-us/articles/360021634540-About-the-glossary), which let you specify specific translations for words or short phrases. Each glossary contains a mapping of source phrases to target phrases. During translation, DeepL intelligently flexes entries to account for case, gender, tense, and other grammar features (if the target language has flexion). You can create glossaries with [any of the languages listed here](/docs/getting-started/supported-languages). +The `glossaries` endpoints let you work with [DeepL glossaries](https://support.deepl.com/hc/en-us/articles/360021634540-About-the-glossary), which let you specify specific translations for words or short phrases. Each glossary contains a mapping of source phrases to target phrases. During translation, DeepL intelligently flexes entries to account for case, gender, tense, and other grammar features (if the target language has flexion). You can create glossaries with [any of the languages listed here](/docs/getting-started/supported-languages). To retrieve supported glossary languages programmatically, call [`GET /v3/languages?resource=glossary`](/api-reference/languages/retrieve-supported-languages-by-product). A **glossary** contains (several) **dictionaries**. A **dictionary** is a mapping of source phrases to target phrases for a single language pair, like this: diff --git a/api-reference/translate.mdx b/api-reference/translate.mdx index 90ce22ee..1da5e477 100644 --- a/api-reference/translate.mdx +++ b/api-reference/translate.mdx @@ -184,7 +184,7 @@ Note that we do not include examples for our client libraries in every single se - Language of the text to be translated. If omitted, the API will attempt to detect the language of the text and translate it. You can find supported source languages here. + Language of the text to be translated. If omitted, the API will attempt to detect the language of the text and translate it. You can find supported source languages here. To check which languages support automatic source language detection, call GET /v3/languages?resource=translate_text and look for the auto_detection feature key in the language's features object. The language into which the text should be translated. You can find supported target languages here. @@ -267,7 +267,7 @@ error. - Sets whether the translated text should lean towards formal or informal language. This feature currently only works for target languages DE (German), FR (French), IT (Italian), ES (Spanish), ES-419 (Latin American Spanish), NL (Dutch), PL (Polish), PT-BR and PT-PT (Portuguese), JA (Japanese), and RU (Russian). Learn more about the plain/polite feature for Japanese ↗️. + Sets whether the translated text should lean towards formal or informal language. This feature currently only works for target languages DE (German), FR (French), IT (Italian), ES (Spanish), ES-419 (Latin American Spanish), NL (Dutch), PL (Polish), PT-BR and PT-PT (Portuguese), JA (Japanese), and RU (Russian). Learn more about the plain/polite feature for Japanese ↗️. To check formality support dynamically, call GET /v3/languages?resource=translate_text and look for the formality feature key on the target language.

Setting this parameter with a target language that does not support formality will fail, unless one of the prefer_... options are used. Possible options are:

+ To check tag handling support for a language pair, call GET /v3/languages?resource=translate_text and verify the tag_handling feature key is present on both the source and target language.
Select which version of the tag handling algorithm should be used. See tag handling v2. diff --git a/api-reference/voice.mdx b/api-reference/voice.mdx index de01713e..25d323e1 100644 --- a/api-reference/voice.mdx +++ b/api-reference/voice.mdx @@ -44,7 +44,7 @@ To start using the Voice API: We support a wide range of source and target languages (see below). However, while translation is always provided by DeepL, for some languages we use external service partners to provide transcription and translated speech. -All source languages can be translated into any target language. +All source languages can be translated into any target language. To retrieve supported languages and feature availability programmatically, call [`GET /v3/languages?resource=voice`](/api-reference/languages/retrieve-supported-languages-by-product) and check for the `transcription`, `transcription_external`, `translated_speech`, and `translated_speech_external` feature keys. | **Language** | **Transcription** | **Translation** | closed beta
Translated Speech | diff --git a/docs/best-practices/language-detection.mdx b/docs/best-practices/language-detection.mdx index 3e39c31b..b2ed88b5 100644 --- a/docs/best-practices/language-detection.mdx +++ b/docs/best-practices/language-detection.mdx @@ -7,3 +7,5 @@ public: true Our translation and document translation endpoints allow you to automatically detect the source language or set it. It is recommended to set the source language whenever possible, as this has a positive effect on translation quality. If you cannot specify the source language, the more context you provide, the better your results will be. Single words can lead to incorrect language detection, so the longer your text, the more reliable it will be. If you are translating single words or very short sentences, the results will generally be more reliable if the source language is specified. You can find all available [source languages here](/api-reference/languages), and you can read more about translation context in the next chapter. + +Not all source languages support automatic detection. To check which languages can be auto-detected, call [`GET /v3/languages?resource=translate_text`](/api-reference/languages/retrieve-supported-languages-by-product) and look for the `auto_detection` feature key on each language. diff --git a/docs/getting-started/supported-languages.mdx b/docs/getting-started/supported-languages.mdx index 4196926a..27478bd5 100644 --- a/docs/getting-started/supported-languages.mdx +++ b/docs/getting-started/supported-languages.mdx @@ -6,7 +6,7 @@ sidebarTitle: "Languages supported" mode: "wide" --- -The DeepL API supports the following languages. These can also be retrieved programmatically via the [`/languages` endpoint](/api-reference/languages/retrieve-supported-languages). +The DeepL API supports the following languages. These can also be retrieved programmatically via the [`/v3/languages` endpoint](/api-reference/languages/retrieve-supported-languages-by-product), which returns language support per resource along with feature availability (e.g. formality, glossary, auto-detection). The legacy [`/v2/languages` endpoint](/api-reference/languages/retrieve-supported-languages) is also available but deprecated. ## API Supported Languages