diff --git a/api-reference/document.mdx b/api-reference/document.mdx index 95dba9c..70ac758 100644 --- a/api-reference/document.mdx +++ b/api-reference/document.mdx @@ -157,6 +157,17 @@ These examples are for demonstration purposes only. In production code, the auth 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. + + Cannot be used together with glossary_ids. + + + + Specify up to 5 glossaries to use for the document translation, as an array of glossary IDs. Each glossary's matching terms are applied to the translated document. + + Important: This requires the source_lang parameter to be set, and every listed glossary must contain a dictionary for the requested language pair. + + Cannot be used together with glossary_id. + Specify the style rule list to use for the translation which can be used to customize translations according to the selected formatting and style conventions. diff --git a/api-reference/openapi.json b/api-reference/openapi.json index cb88b5e..ea84d40 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -783,10 +783,19 @@ "$ref": "#/components/schemas/ModelType" }, "glossary_id": { - "description": "Specify the glossary to use for the translation. **Important:** This requires the `source_lang`\nparameter to be set. The language pair of the glossary has to match the language pair of the\nrequest.", + "description": "Specify the glossary to use for the translation. **Important:** This requires the `source_lang`\nparameter to be set. The language pair of the glossary has to match the language pair of the\nrequest.\n\nCannot be used together with `glossary_ids`.", "type": "string", "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" }, + "glossary_ids": { + "description": "Specify up to 5 glossaries to use for the translation, as an array of glossary IDs. Each glossary's matching terms are applied to the translation.\n\n**Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair.\n\nCannot be used together with `glossary_id`.", + "type": "array", + "maxItems": 5, + "items": { + "type": "string", + "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" + } + }, "style_id": { "description": "Specify the [style rule list](/api-reference/style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list.\n\nAll `model_type` values are supported.", "type": "string", @@ -889,10 +898,19 @@ "$ref": "#/components/schemas/ModelType" }, "glossary_id": { - "description": "Specify the glossary to use for the translation. **Important:** This requires the `source_lang`\nparameter to be set. The language pair of the glossary has to match the language pair of the\nrequest.", + "description": "Specify the glossary to use for the translation. **Important:** This requires the `source_lang`\nparameter to be set. The language pair of the glossary has to match the language pair of the\nrequest.\n\nCannot be used together with `glossary_ids`.", "type": "string", "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" }, + "glossary_ids": { + "description": "Comma-separated list of up to 5 glossary IDs to use for the translation. Each glossary's matching terms are applied to the translation. May also be sent as a repeated parameter.\n\n**Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair.\n\nCannot be used together with `glossary_id`.", + "type": "array", + "maxItems": 5, + "items": { + "type": "string", + "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" + } + }, "translation_memory_id": { "$ref": "#/components/schemas/TranslationMemoryId" }, @@ -1068,6 +1086,15 @@ "glossary_id": "[yourGlossaryId]" } }, + "MultipleGlossaries": { + "summary": "Using Multiple Glossaries", + "value": { + "source_lang": "EN", + "target_lang": "DE", + "file": "@document.docx", + "glossary_ids": "[yourGlossaryId1],[yourGlossaryId2]" + } + }, "StyleRule": { "summary": "Using a Style Rule List", "value": { @@ -1118,7 +1145,18 @@ "$ref": "#/components/schemas/Formality" }, "glossary_id": { - "$ref": "#/components/schemas/GlossaryId" + "description": "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.\n\nCannot be used together with `glossary_ids`.", + "type": "string", + "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" + }, + "glossary_ids": { + "description": "Comma-separated list of up to 5 glossary IDs to use for the translation. Each glossary's matching terms are applied to the translated document. May also be sent as a repeated parameter.\n\n**Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair.\n\nCannot be used together with `glossary_id`.", + "type": "array", + "maxItems": 5, + "items": { + "type": "string", + "example": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7" + } }, "style_id": { "description": "Specify the [style rule list](/api-reference/style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list.", diff --git a/api-reference/openapi.yaml b/api-reference/openapi.yaml index a623a2c..240748e 100644 --- a/api-reference/openapi.yaml +++ b/api-reference/openapi.yaml @@ -578,8 +578,22 @@ paths: Specify the glossary to use for the translation. **Important:** This requires the `source_lang` parameter to be set. The language pair of the glossary has to match the language pair of the request. + + Cannot be used together with `glossary_ids`. type: string example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 + glossary_ids: + description: |- + Specify up to 5 glossaries to use for the translation, as an array of glossary IDs. Each glossary's matching terms are applied to the translation. + + **Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair. + + Cannot be used together with `glossary_id`. + type: array + maxItems: 5 + items: + type: string + example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 style_id: description: |- Specify the [style rule list](/api-reference/style-rules) to use for the translation. @@ -669,8 +683,22 @@ paths: Specify the glossary to use for the translation. **Important:** This requires the `source_lang` parameter to be set. The language pair of the glossary has to match the language pair of the request. + + Cannot be used together with `glossary_ids`. type: string example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 + glossary_ids: + description: |- + Comma-separated list of up to 5 glossary IDs to use for the translation. Each glossary's matching terms are applied to the translation. May also be sent as a repeated parameter. + + **Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair. + + Cannot be used together with `glossary_id`. + type: array + maxItems: 5 + items: + type: string + example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 translation_memory_id: $ref: '#/components/schemas/TranslationMemoryId' translation_memory_threshold: @@ -801,6 +829,13 @@ paths: target_lang: DE file: '@document.docx' glossary_id: '[yourGlossaryId]' + MultipleGlossaries: + summary: Using Multiple Glossaries + value: + source_lang: EN + target_lang: DE + file: '@document.docx' + glossary_ids: '[yourGlossaryId1],[yourGlossaryId2]' StyleRule: summary: Using a Style Rule List value: @@ -851,7 +886,24 @@ paths: formality: $ref: '#/components/schemas/Formality' glossary_id: - $ref: '#/components/schemas/GlossaryId' + description: |- + 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. + + Cannot be used together with `glossary_ids`. + type: string + example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 + glossary_ids: + description: |- + Comma-separated list of up to 5 glossary IDs to use for the translation. Each glossary's matching terms are applied to the translated document. May also be sent as a repeated parameter. + + **Important:** This requires the `source_lang` parameter to be set. Every listed glossary must contain a dictionary for the requested language pair. + + Cannot be used together with `glossary_id`. + type: array + maxItems: 5 + items: + type: string + example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7 style_id: description: |- Specify the [style rule list](/api-reference/style-rules) to use for the translation. diff --git a/api-reference/translate.mdx b/api-reference/translate.mdx index 43f3034..9fd0d49 100644 --- a/api-reference/translate.mdx +++ b/api-reference/translate.mdx @@ -276,9 +276,19 @@ Note that we do not include examples for our client libraries in every single se Specify the glossary to use for the translation. Important: This requires the source_lang parameter to be set and the language pair of the glossary has to match the language pair of the request. + + Cannot be used together with glossary_ids. To check glossary support for a language pair, call GET /v3/languages?resource=translate_text and verify the glossary feature key is present on both the source and target language. + + Specify up to 5 glossaries to use for the translation, as an array of glossary IDs. Each glossary's matching terms are applied to the translation. + + Important: This requires the source_lang parameter to be set, and every listed glossary must contain a dictionary for the requested language pair. + + Cannot be used together with glossary_id. + + Specify the style rule list to use for the translation which can be used to customize translations according to the selected formatting and style conventions. diff --git a/docs/resources/roadmap-and-release-notes.mdx b/docs/resources/roadmap-and-release-notes.mdx index e079dd0..c1d645b 100644 --- a/docs/resources/roadmap-and-release-notes.mdx +++ b/docs/resources/roadmap-and-release-notes.mdx @@ -10,6 +10,13 @@ rss: true + +## June 23 - Multiple Glossaries per Translation Request +- [`POST /v2/translate`](/api-reference/translate/request-translation) and [`POST /v2/document`](/api-reference/document/upload-and-translate-a-document) now accept a `glossary_ids` parameter, allowing you to apply up to 5 glossaries to a single translation request. +- Useful when terminology is split across multiple glossaries (for example, a shared brand glossary plus a project-specific glossary) that you want applied together without merging them. +- `glossary_ids` requires `source_lang` and is mutually exclusive with the existing `glossary_id` parameter. Every listed glossary must contain a dictionary for the requested language pair. +- See the [text translation](/api-reference/translate#request-body-descriptions) and [document translation](/api-reference/document#request-body-descriptions) overview pages for parameter details. + ## June 17 - `latency_optimized` Now Supported for All Features - The `latency_optimized` model type is now fully compatible with all Translate API features, including: - [Tag handling v2](/docs/xml-and-html-handling/tag-handling-v2) (`tag_handling_version=v2`) @@ -25,6 +32,7 @@ rss: true - Currently in private beta for select customers. To request access, contact your customer success manager or [DeepL support](https://support.deepl.com/hc/en-us/requests/new). - Not yet supported for the Voice API; Voice scopes will follow in a future update. + ## June 8 - Style Rules and Translation Memories for Document Translation - [`POST /v2/document`](/api-reference/document/upload-and-translate-a-document) now accepts `style_id`, `translation_memory_id`, and `translation_memory_threshold`, bringing document translation in line with the parameters already available on text translation. - `style_id` applies a configured [style rule list](/api-reference/style-rules) to the document translation.