diff --git a/api-reference/openapi.json b/api-reference/openapi.json index b513d928..c2491d4d 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -820,7 +820,7 @@ } }, "style_id": { - "description": "Specify the [style rule list](/docs/customize/using-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.", + "description": "Specify the [style rule list](/docs/customize/using-style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list. A list\ncreated for a root language (for example `en`) applies to that language and all of its variants\n(`EN-GB`, `EN-US`). A list created for a variant (for example `en-GB`) applies only when\n`target_lang` is that variant.\n\nAll `model_type` values are supported.", "type": "string", "example": "7ff9bfd6-cd85-4190-8503-d6215a321519" }, @@ -1200,7 +1200,7 @@ } }, "style_id": { - "description": "Specify the [style rule list](/docs/customize/using-style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list.", + "description": "Specify the [style rule list](/docs/customize/using-style-rules) to use for the translation.\n\n**Important:** The target language has to match the language of the style rule list. A list\ncreated for a root language (for example `en`) applies to that language and all of its variants\n(`EN-GB`, `EN-US`). A list created for a variant (for example `en-GB`) applies only when\n`target_lang` is that variant.", "type": "string", "example": "7ff9bfd6-cd85-4190-8503-d6215a321519" }, @@ -5285,7 +5285,7 @@ "post": { "summary": "Create a style rule list", "operationId": "createStyleRuleList", - "description": "Create a style rule list for a single language, optionally with its configured rules\nand custom instructions. Use the returned `style_id` with the translation endpoints\nto apply the list.", + "description": "Create a style rule list for a single language, optionally with its configured rules\nand custom instructions. The `language` can be a root code such as `de` or a variant\ncode such as `de-CH`. Use the returned `style_id` with the translation endpoints\nto apply the list.", "requestBody": { "required": true, "content": { @@ -8842,17 +8842,54 @@ "example": "bd0a38f3-1831-440b-a8dd-2c702e2325ab" }, "StyleRuleLanguage": { - "description": "The language that the style rule list is applied to.", + "description": "The target language the style rule list applies to. Codes are matched case-insensitively;\nthe response returns the canonical form (for example `de-CH`).\n\nA root code (for example `en`) applies to that language and all of its variants. A variant\ncode (for example `en-GB`) applies only when `target_lang` is that variant.\n\nVariant lists for `de-CH`, `fr-CA`, `pt-BR`, and `pt-PT` are generally available. Variant\nlists for `de-DE`, `en-GB`, `en-US`, `es-419`, `es-ES`, `fr-FR`, `zh-Hans`, and `zh-Hant`\nare in beta. The current list and the status of each language are returned by\n[`GET /v3/languages?resource=style_rules&include=beta`](/docs/languages/using-the-languages-api).", "type": "string", "enum": [ + "ar", + "bg", + "cs", + "da", "de", + "de-CH", + "de-DE", + "el", "en", + "en-GB", + "en-US", "es", + "es-419", + "es-ES", + "et", + "fi", "fr", + "fr-CA", + "fr-FR", + "he", + "hu", + "id", "it", "ja", "ko", - "zh" + "lt", + "lv", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "uk", + "vi", + "zh", + "zh-Hans", + "zh-Hant" ] }, "StyleRuleName": { diff --git a/api-reference/openapi.yaml b/api-reference/openapi.yaml index 038b6028..e54b344a 100644 --- a/api-reference/openapi.yaml +++ b/api-reference/openapi.yaml @@ -647,7 +647,10 @@ paths: description: |- Specify the [style rule list](/docs/customize/using-style-rules) to use for the translation. - **Important:** The target language has to match the language of the style rule list. + **Important:** The target language has to match the language of the style rule list. A list + created for a root language (for example `en`) applies to that language and all of its variants + (`EN-GB`, `EN-US`). A list created for a variant (for example `en-GB`) applies only when + `target_lang` is that variant. All `model_type` values are supported. type: string @@ -979,7 +982,10 @@ paths: description: |- Specify the [style rule list](/docs/customize/using-style-rules) to use for the translation. - **Important:** The target language has to match the language of the style rule list. + **Important:** The target language has to match the language of the style rule list. A list + created for a root language (for example `en`) applies to that language and all of its variants + (`EN-GB`, `EN-US`). A list created for a variant (for example `en-GB`) applies only when + `target_lang` is that variant. type: string example: 7ff9bfd6-cd85-4190-8503-d6215a321519 translation_memory_id: @@ -3797,7 +3803,8 @@ paths: operationId: createStyleRuleList description: |- Create a style rule list for a single language, optionally with its configured rules - and custom instructions. Use the returned `style_id` with the translation endpoints + and custom instructions. The `language` can be a root code such as `de` or a variant + code such as `de-CH`. Use the returned `style_id` with the translation endpoints to apply the list. requestBody: required: true @@ -6389,17 +6396,64 @@ components: description: A unique ID assigned to a style rule list. example: "bd0a38f3-1831-440b-a8dd-2c702e2325ab" StyleRuleLanguage: - description: The language that the style rule list is applied to. + description: |- + The target language the style rule list applies to. Codes are matched case-insensitively; + the response returns the canonical form (for example `de-CH`). + + A root code (for example `en`) applies to that language and all of its variants. A variant + code (for example `en-GB`) applies only when `target_lang` is that variant. + + Variant lists for `de-CH`, `fr-CA`, `pt-BR`, and `pt-PT` are generally available. Variant + lists for `de-DE`, `en-GB`, `en-US`, `es-419`, `es-ES`, `fr-FR`, `zh-Hans`, and `zh-Hant` + are in beta. The current list and the status of each language are returned by + [`GET /v3/languages?resource=style_rules&include=beta`](/docs/languages/using-the-languages-api). type: string enum: + - ar + - bg + - cs + - da - de + - de-CH + - de-DE + - el - en + - en-GB + - en-US - es + - es-419 + - es-ES + - et + - fi - fr + - fr-CA + - fr-FR + - he + - hu + - id - it - ja - ko + - lt + - lv + - nb + - nl + - pl + - pt + - pt-BR + - pt-PT + - ro + - ru + - sk + - sl + - sv + - th + - tr + - uk + - vi - zh + - zh-Hans + - zh-Hant StyleRuleName: description: Name associated with the style rule list. type: string diff --git a/docs/resources/roadmap-and-release-notes.mdx b/docs/resources/roadmap-and-release-notes.mdx index c127cba9..06e6e9ca 100644 --- a/docs/resources/roadmap-and-release-notes.mdx +++ b/docs/resources/roadmap-and-release-notes.mdx @@ -9,6 +9,11 @@ rss: true +## September 29 - Style Rules for Language Variants +- [Style rule lists](/docs/customize/using-style-rules) hold the configured rules and custom instructions DeepL applies when translating into one target language. A list could previously only be created for a root language such as `de`, and it applied to every variant of that language. You can now also create a list for a specific variant, such as `de-CH` or `en-GB`, so conventions that differ between variants stay separate. +- Set the variant code in the `language` field of [`POST /v3/style_rules`](/api-reference/style-rules/create-style-rule). A variant list applies when `target_lang` is that variant; root-language lists keep applying to all variants as before. +- Lists for `de-CH`, `fr-CA`, `pt-BR`, and `pt-PT` are generally available; lists for `de-DE`, `en-GB`, `en-US`, `es-419`, `es-ES`, `fr-FR`, `zh-Hans`, and `zh-Hant` are in beta. The current list and the status of each language are returned by [`GET /v3/languages?resource=style_rules&include=beta`](/docs/languages/using-the-languages-api). + ## September 22 - New Voice API Languages: Catalan and Galician - The [Voice API](/docs/voice/overview) now supports `ca` (Catalan) and `gl` (Galician) as source languages and as targets for translation and translated speech. Both are beta for the Voice API; they are already generally available for text and document translation. Translation is provided by DeepL; transcription and translated speech are provided by external service partners, so the source language must be set explicitly (no auto-detection). - Both languages are marked `"external": true` on the `transcription` and `translated_speech` features in the [`GET /v3/languages?resource=voice`](/docs/languages/using-the-languages-api) response. Because they are beta and external, call with `include=beta&include=external` to see them.