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 06511fa..8e96808 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -775,10 +775,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\n**Note:** Any request with the `style_id` parameter enabled will use `quality_optimized` models. Requests combining `style_id` and `model_type: latency_optimized` will be rejected.", "type": "string", @@ -881,10 +890,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" }, @@ -1051,6 +1069,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": { @@ -1101,7 +1128,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 b47bf07..962cfc6 100644 --- a/api-reference/openapi.yaml +++ b/api-reference/openapi.yaml @@ -572,8 +572,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. @@ -665,8 +679,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: @@ -787,6 +815,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: @@ -837,7 +872,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 0f99ac3..effd1b3 100644 --- a/api-reference/translate.mdx +++ b/api-reference/translate.mdx @@ -282,9 +282,19 @@ error. 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 40fc251..22a933a 100644 --- a/docs/resources/roadmap-and-release-notes.mdx +++ b/docs/resources/roadmap-and-release-notes.mdx @@ -11,6 +11,12 @@ rss: true +## June 10 - 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 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.