From 56fdc2a17a70e2ca03e0855944448bc723736ffb Mon Sep 17 00:00:00 2001 From: Brianna Delgado Date: Sun, 15 Feb 2026 16:35:11 +0900 Subject: [PATCH] Add documentation for new style rules CRUD endpoints --- .../languages/language-feature-use-cases.mdx | 20 + api-reference/openapi.yaml | 450 +++++++- api-reference/style-rules.mdx | 967 ++++++++++++++++-- .../style-rules/create-custom-instruction.mdx | 4 + .../style-rules/create-style-rule.mdx | 4 + .../style-rules/delete-custom-instruction.mdx | 4 + .../style-rules/delete-style-rule.mdx | 4 + .../style-rules/get-custom-instruction.mdx | 4 + api-reference/style-rules/get-style-rule.mdx | 4 + .../style-rules/update-configured-rules.mdx | 4 + .../style-rules/update-custom-instruction.mdx | 4 + .../style-rules/update-style-rule.mdx | 4 + docs.json | 11 +- docs/getting-started/supported-languages.mdx | 4 + docs/resources/roadmap-and-release-notes.mdx | 10 + snippets/language-table.jsx | 254 ++--- 16 files changed, 1531 insertions(+), 221 deletions(-) create mode 100644 api-reference/style-rules/create-custom-instruction.mdx create mode 100644 api-reference/style-rules/create-style-rule.mdx create mode 100644 api-reference/style-rules/delete-custom-instruction.mdx create mode 100644 api-reference/style-rules/delete-style-rule.mdx create mode 100644 api-reference/style-rules/get-custom-instruction.mdx create mode 100644 api-reference/style-rules/get-style-rule.mdx create mode 100644 api-reference/style-rules/update-configured-rules.mdx create mode 100644 api-reference/style-rules/update-custom-instruction.mdx create mode 100644 api-reference/style-rules/update-style-rule.mdx diff --git a/api-reference/languages/language-feature-use-cases.mdx b/api-reference/languages/language-feature-use-cases.mdx index b8b331bd..ec1da7fd 100644 --- a/api-reference/languages/language-feature-use-cases.mdx +++ b/api-reference/languages/language-feature-use-cases.mdx @@ -114,6 +114,26 @@ else: --- +## Check if style rules are available for a target language + +Use `product=style_rules` to query which languages support style rules. Style rules are target-language only — check +that the target language is listed in the response. The `style_rules` product has no additional features, so only +the language availability needs to be checked. + +``` +GET /v3/languages?product=style_rules + +languages = response +target = languages.find(l => l.lang == selected_target_lang) + +if target and target.usable_as_target: + show style_rules_selector +else: + hide style_rules_selector +``` + +--- + ## Determine feature support programmatically Use `/v3/languages/products` to drive feature checks at runtime — without hardcoding which features are diff --git a/api-reference/openapi.yaml b/api-reference/openapi.yaml index 5abf37e1..56ed310f 100644 --- a/api-reference/openapi.yaml +++ b/api-reference/openapi.yaml @@ -9,7 +9,7 @@ info: contact: name: DeepL - Contact us url: https://www.deepl.com/contact-us - version: 3.6.0 + version: 3.9.0 externalDocs: description: DeepL Pro - Plans and pricing url: https://www.deepl.com/pro#developer @@ -1985,6 +1985,7 @@ paths: - glossary - voice - write + - style_rules example: translate_text endpoints: description: API endpoints associated with this product. @@ -2041,6 +2042,10 @@ paths: - name: glossary required_on_source: true required_on_target: true + - name: style_rules + endpoints: + - v3/style_rules + features: [] 400: $ref: '#/components/responses/BadRequest' 401: @@ -2079,10 +2084,11 @@ paths: - glossary - voice - write + - style_rules example: translate_text description: |- The product to retrieve languages for. Supported values: `translate_text`, `translate_document`, - `glossary`, `voice`, `write`. + `glossary`, `voice`, `write`, `style_rules`. responses: 200: description: JSON array where each item represents a supported language. @@ -2202,6 +2208,7 @@ paths: - glossary - voice - write + - style_rules example: translate_text description: The product for which to retrieve language pair exceptions. Required. responses: @@ -2311,6 +2318,431 @@ paths: $ref: '#/components/responses/ServiceUnavailable' security: - auth_header: [] + post: + summary: Create a style rule list + operationId: createStyleRuleList + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - language + properties: + name: + $ref: '#/components/schemas/StyleRuleName' + language: + $ref: '#/components/schemas/StyleRuleLanguage' + configured_rules: + $ref: '#/components/schemas/ConfiguredRules' + custom_instructions: + type: array + description: Array of custom instruction objects + maxItems: 200 + items: + type: object + required: + - label + - prompt + properties: + label: + type: string + description: Label for the custom instruction + prompt: + type: string + description: Instruction text + maxLength: 300 + source_language: + type: string + description: Optional source language code + responses: + 201: + description: Style rule list created successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/StyleRuleList' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 429: + $ref: '#/components/responses/TooManyRequests' + 456: + $ref: '#/components/responses/QuotaExceeded' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + /v3/style_rules/{style_id}: + get: + summary: Get a style rule list + operationId: getStyleRuleList + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + responses: + 200: + description: Style rule list details + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/StyleRuleList' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + patch: + summary: Update a style rule list + operationId: updateStyleRuleList + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + $ref: '#/components/schemas/StyleRuleName' + responses: + 200: + description: Style rule list updated successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/StyleRuleList' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 456: + $ref: '#/components/responses/QuotaExceeded' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + delete: + summary: Delete a style rule list + operationId: deleteStyleRuleList + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + responses: + 204: + description: Style rule list deleted successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + /v3/style_rules/{style_id}/configured_rules: + put: + summary: Replace configured rules for a style rule list + operationId: updateStyleRuleConfiguredRules + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfiguredRules' + example: + dates_and_times: + calendar_era: "use_bc_and_ad" + punctuation: + periods_in_academic_degrees: "do_not_use" + responses: + 200: + description: Configured rules updated successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/StyleRuleList' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + /v3/style_rules/{style_id}/custom_instructions: + post: + summary: Create a custom instruction + operationId: createCustomInstruction + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - label + - prompt + properties: + label: + type: string + description: Label for the custom instruction + maxLength: 100 + prompt: + type: string + description: Instruction text + maxLength: 300 + source_language: + type: string + description: Optional source language code + responses: + 201: + description: Custom instruction created successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomInstruction' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 456: + $ref: '#/components/responses/QuotaExceeded' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + /v3/style_rules/{style_id}/custom_instructions/{instruction_id}: + get: + summary: Get a custom instruction + operationId: getCustomInstruction + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + - name: instruction_id + in: path + required: true + schema: + type: string + description: The ID of the custom instruction + responses: + 200: + description: Custom instruction details + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomInstruction' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + put: + summary: Replace a custom instruction + operationId: updateCustomInstruction + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + - name: instruction_id + in: path + required: true + schema: + type: string + description: The ID of the custom instruction + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - label + - prompt + properties: + label: + type: string + description: Updated label for the custom instruction + maxLength: 100 + prompt: + type: string + description: Updated instruction text + maxLength: 300 + source_language: + type: string + description: Optional source language code + responses: + 200: + description: Custom instruction updated successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomInstruction' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] + delete: + summary: Delete a custom instruction + operationId: deleteCustomInstruction + parameters: + - name: style_id + in: path + required: true + schema: + type: string + description: The ID of the style rule list + - name: instruction_id + in: path + required: true + schema: + type: string + description: The ID of the custom instruction + responses: + 204: + description: Custom instruction deleted successfully + headers: + X-Trace-ID: + $ref: '#/components/headers/X-Trace-ID' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 429: + $ref: '#/components/responses/TooManyRequests' + 500: + $ref: '#/components/responses/InternalServerError' + 503: + $ref: '#/components/responses/ServiceUnavailable' + security: + - auth_header: [] /v3/voice/realtime: servers: - url: https://api.deepl.com @@ -3911,7 +4343,15 @@ components: CustomInstruction: description: All enabled custom instructions for the style rule list type: object + required: + - id + - label + - prompt properties: + id: + type: string + description: Unique identifier for the custom instruction + example: "68fdb803-c013-4e67-b62e-1aad0ab519cd" label: type: string description: Name associated with the custom instruction @@ -3955,11 +4395,7 @@ components: type: integer example: 13 configured_rules: - type: array - description: |- - List of configured rules enabled for the style rule list. - items: - $ref: '#/components/schemas/ConfiguredRules' + $ref: '#/components/schemas/ConfiguredRules' custom_instructions: type: array description: |- diff --git a/api-reference/style-rules.mdx b/api-reference/style-rules.mdx index 1a32a4ab..b05ef417 100644 --- a/api-reference/style-rules.mdx +++ b/api-reference/style-rules.mdx @@ -8,140 +8,931 @@ description: "Manage a shared list of rules for style, formatting, and more" The Style Rules API is currently available only to Pro API subscribers. +## Overview + The style rules feature allows you to select a set of rules to apply when translating text. These rules make changes to your text according to the selected formatting and spelling conventions. -You can create style rules in the UI at [https://deepl.com/custom-rules](https://deepl.com/custom-rules). +You can create style rules in the UI at [https://deepl.com/custom-rules](https://deepl.com/custom-rules). + +Both glossaries and style rules are unique to each of DeepL's global data centers and are not shared between them. Clients using the `api-us.deepl.com` endpoint will not be able to access glossaries or style rules created in the UI at this time. + +A **style rule list** contains two types of rules: +- **Configured rules**: Predefined rules for formatting conventions (e.g., time format, number formatting, style and tone) +- **Custom instructions**: User-defined instructions for specific styling requirements + +Both configured rules and custom instructions are applied during translation to ensure your translations match your style requirements. They work together to provide comprehensive style control over your translated content. + +### Limits + +- There is no limit to how many predefined rules can be selected per style rule list +- A maximum of 200 custom instructions can be enabled per style rule list (although this may be adjusted based on plan tiers in the future) +- Each custom instruction is at most 300 characters + +If you need more than 200 custom instructions, consider organizing your rules into multiple style rule lists for different use cases or content types. + +## Creating style rules + +### Create a style rule list -Both style rules and glossaries are unique to each of DeepL's global data centers and are not shared between them. Clients using the `api-us.deepl.com` endpoint will not be able to access glossaries or style rules created in the UI at this time. +`POST /v3/style_rules` -### Get all style rule lists -Get all style rules lists and their meta-information. +Create a new style rule list with configured rules and optional custom instructions. - + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. -```sh Example request: get all style rule lists -curl -X GET 'https://api.deepl.com/v3/style_rules' \ ---header 'Authorization: DeepL-Auth-Key [yourAuthKey]' -``` + ```sh Example request: create a style rule list + curl -X POST 'https://api.deepl.com/v3/style_rules' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ + --header 'Content-Type: application/json' \ + --data '{ + "name": "Technical Documentation Rules", + "language": "en", + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] + }' + ``` -```json Example response -{ - "style_rules": [ + ```json Example response { "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", "name": "Technical Documentation Rules", "creation_time": "2024-10-01T12:34:56Z", - "updated_time": "2024-10-03T12:34:56Z", - "language": "EN", - "version": 8 + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 1, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] } - ] -} -``` -You can also optionally pass in a `detailed` query parameter, to retrieve all configured rules and custom instructions per rule list. + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. -```sh Example request: get all style rule lists and their configured rules -curl -X GET 'https://api.deepl.com/v3/style_rules?detailed=true' \ ---header 'Authorization: DeepL-Auth-Key [yourAuthKey]' -``` + ```http Example request: create a style rule list + POST /v3/style_rules HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + Content-Length: 234 + Content-Type: application/json + + { + "name": "Technical Documentation Rules", + "language": "en", + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] + } + ``` -```json Example response -{ - "style_rules": [ + ```json Example response { "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", "name": "Technical Documentation Rules", "creation_time": "2024-10-01T12:34:56Z", - "updated_time": "2024-10-03T12:34:56Z", - "language": "EN", - "version": 8, + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 1, "configured_rules": { - "numbers": { - "time_format": "always-use-24-hour-clock" + "dates_and_times": { + "calendar_era": "use_bc_and_ad" }, - "style_and_tone": { - "instructions_style": "use-imperative", - "redundant_introductory_words": "avoid-redundant-introductory-words-that-relate-to-current-text" + "punctuation": { + "periods_in_academic_degrees": "do_not_use" } }, - "custom_instructions": { - "label": "My Custom instruction", - "prompt": "Use a friendly, diplomatic tone" - } + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] } - ] -} -``` - - - -```http Example request: get all style rule lists -GET https://api.deepl.com/v3/style_rules HTTP/2 -Host: api.deepl.com -Authorization: DeepL-Auth-Key [yourAuthKey] -User-Agent: YourApp/1.2.3 -``` -```json Example response -{ - "style_rules": [ + ``` + + + +#### Request body parameters + + + The name of the style rule list. Maximum length: 1024 characters. + + + The target language for the style rules. Supported values: `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `zh`. + + + An object containing predefined rules to enable for the style rule list. Rules are organized by category (e.g., `dates_and_times`, `punctuation`). Each category can contain multiple rule options. + + + An array of custom instruction objects. Each custom instruction must include `label`, `prompt`, and optionally `source_language`. Maximum 200 custom instructions per style rule list. Each prompt is limited to 300 characters. + + + + The `version` field in the response increments each time the style rule list is modified (e.g., when rules are updated or custom instructions are added/removed). You can use this field to track changes to your style rules. + + +## Retrieving style rules + +### List all style rule lists + +`GET /v3/style_rules` + +Get all style rule lists and their meta-information. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: get all style rule lists + curl -X GET 'https://api.deepl.com/v3/style_rules' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + ```json Example response + { + "style_rules": [ + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-03T12:34:56Z", + "language": "en", + "version": 8 + } + ] + } + ``` + + You can also optionally pass in a `detailed` query parameter to retrieve all configured rules and custom instructions per rule list. + + ```sh Example request: get all style rule lists with details + curl -X GET 'https://api.deepl.com/v3/style_rules?detailed=true' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + ```json Example response + { + "style_rules": [ + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-03T12:34:56Z", + "language": "en", + "version": 8, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ] + } + ] + } + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: get all style rule lists + GET /v3/style_rules HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` + + ```json Example response + { + "style_rules": [ + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-03T12:34:56Z", + "language": "en", + "version": 8 + } + ] + } + ``` + + You can also optionally pass in a `detailed` query parameter to retrieve all configured rules and custom instructions per rule list. + + ```http Example request: get all style rule lists with details + GET /v3/style_rules?detailed=true HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` + + ```json Example response + { + "style_rules": [ + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-03T12:34:56Z", + "language": "en", + "version": 8, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ] + } + ] + } + ``` + + + +#### Query parameters + + + Determines if the rule list's `configured_rules` and `custom_instructions` should be included in the response body. If `detailed` parameter is not included, defaults to `false`. + + + The index of the first page to return. Default: 0 (the first page). Use with `page_size` to get the next page of rule lists. + + + The maximum number of style rule lists to return. Default: 10. Minimum: 1. Maximum: 25. + + +### Get a style rule list + +`GET /v3/style_rules/{style_id}` + +Get detailed information for a single style rule list, including all configured rules and custom instructions. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: retrieve style rule list + curl -X GET 'https://api.deepl.com/v3/style_rules/{style_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + ```json Example response { "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", "name": "Technical Documentation Rules", "creation_time": "2024-10-01T12:34:56Z", "updated_time": "2024-10-03T12:34:56Z", - "language": "EN", - "version": 8 + "language": "en", + "version": 8, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ] } - ] -} -``` + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. -You can also optionally pass in a `detailed` query parameter, to retrieve all configured rules and custom instructions per rule list. + ```http Example request: retrieve style rule list + GET /v3/style_rules/{style_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` -```http Example request: get all style rule lists and their configured rules -GET https://api.deepl.com/v3/style_rules?detailed=true HTTP/2 -Host: api.deepl.com -Authorization: DeepL-Auth-Key [yourAuthKey] -User-Agent: YourApp/1.2.3 -``` -```json Example response -{ - "style_rules": [ + ```json Example response { "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", "name": "Technical Documentation Rules", "creation_time": "2024-10-01T12:34:56Z", "updated_time": "2024-10-03T12:34:56Z", - "language": "EN", + "language": "en", "version": 8, "configured_rules": { - "numbers": { - "time_format": "always-use-24-hour-clock" + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ] + } + ``` + + + +## Updating style rules + +Use `PATCH /v3/style_rules/{style_id}` to update the name of a style rule list, or use `PUT /v3/style_rules/{style_id}/configured_rules` to replace all configured rules. + +### Update a style rule list + +`PATCH /v3/style_rules/{style_id}` + +Update the name of a style rule list. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: update a style rule list + curl -X PATCH 'https://api.deepl.com/v3/style_rules/{style_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ + --header 'Content-Type: application/json' \ + --data '{ + "name": "New Technical Documentation Rules" + }' + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "New Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 2, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" }, - "style_and_tone": { - "instructions_style": "use-imperative", - "redundant_introductory_words": "avoid-redundant-introductory-words-that-relate-to-current-text" + "punctuation": { + "periods_in_academic_degrees": "do_not_use" } }, - "custom_instructions": { - "label": "My Custom instruction", - "prompt": "Use a friendly, diplomatic tone" + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] + } + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: update a style rule list + PATCH /v3/style_rules/{style_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + Content-Length: 52 + Content-Type: application/json + + { + "name": "New Technical Documentation Rules" + } + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "New Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 2, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] + } + ``` + + + +#### Request body parameters + + + The new name for the style rule list. Maximum length: 1024 characters. + + +### Replace configured rules + +`PUT /v3/style_rules/{style_id}/configured_rules` + +Replace all configured rules for a style rule list. Custom instructions are not affected. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: replace configured rules + curl -X PUT 'https://api.deepl.com/v3/style_rules/{style_id}/configured_rules' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ + --header 'Content-Type: application/json' \ + --data '{ + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" } + }' + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-04T12:34:56Z", + "language": "en", + "version": 3, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] } - ] -} -``` - + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: replace configured rules + PUT /v3/style_rules/{style_id}/configured_rules HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + Content-Length: 145 + Content-Type: application/json + + { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + } + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-04T12:34:56Z", + "language": "en", + "version": 3, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + } + ] + } + ``` + -### Query parameters - -Determines if the rule list's `configured_rules` and `custom_instructions` should be included in the response body. If `detailed` parameter is not included, defaults to `false`. +#### Request body parameters + + + A `ConfiguredRules` object containing the complete set of predefined rules. This replaces all existing configured rules for the style rule list. Rules are organized by category (e.g., `dates_and_times`, `punctuation`). + + + + This endpoint replaces the entire configured rules object. Use `PATCH /v3/style_rules/{style_id}` instead if you only want to update specific rules or the style rule list name. + + +### Delete a style rule list + +`DELETE /v3/style_rules/{style_id}` + +Delete a style rule list. This operation cannot be undone. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: delete style rule list + curl -X DELETE 'https://api.deepl.com/v3/style_rules/{style_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + Returns a `204 No Content` status code on successful deletion. The response body will be empty. If the style rule list is not found, a `404` error will be returned. + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: delete style rule list + DELETE /v3/style_rules/{style_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` + + Returns a `204 No Content` status code on successful deletion. The response body will be empty. If the style rule list is not found, a `404` error will be returned. + + + +## Managing custom instructions + +### Create a custom instruction + +`POST /v3/style_rules/{style_id}/custom_instructions` + +Add a new custom instruction to an existing style rule list. The response returns the complete updated style rule list, including the new custom instruction with its generated ID. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: create custom instruction + curl -X POST 'https://api.deepl.com/v3/style_rules/{style_id}/custom_instructions' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ + --header 'Content-Type: application/json' \ + --data '{ + "label": "Currency format instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + }' + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 2, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + }, + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Currency format instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ] + } + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: create custom instruction + POST /v3/style_rules/{style_id}/custom_instructions HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + Content-Length: 145 + Content-Type: application/json + + { + "label": "Currency format instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ``` + + ```json Example response + { + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994", + "name": "Technical Documentation Rules", + "creation_time": "2024-10-01T12:34:56Z", + "updated_time": "2024-10-01T12:34:56Z", + "language": "en", + "version": 2, + "configured_rules": { + "dates_and_times": { + "calendar_era": "use_bc_and_ad" + }, + "punctuation": { + "periods_in_academic_degrees": "do_not_use" + } + }, + "custom_instructions": [ + { + "id": "68fdb803-c013-4e67-b62e-1aad0ab519cd", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "en" + }, + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Currency format instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ] + } + ``` + + + +#### Request body parameters + + + A short descriptive label for the custom instruction. Maximum length: 100 characters. + + + The instruction text that defines the style requirement. Maximum length: 300 characters. + + + Optional source language code for the custom instruction (e.g., `en`, `de`, `fr`). + + +### Get a custom instruction + +`GET /v3/style_rules/{style_id}/custom_instructions/{instruction_id}` + +Get details for a specific custom instruction within a style rule list. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: retrieve custom instruction + curl -X GET 'https://api.deepl.com/v3/style_rules/{style_id}/custom_instructions/{instruction_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + ```json Example response + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: retrieve custom instruction + GET /v3/style_rules/{style_id}/custom_instructions/{instruction_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` + + ```json Example response + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Tone instruction", + "prompt": "Use a friendly, diplomatic tone", + "source_language": "de" + } + ``` + + + +### Replace a custom instruction + +`PUT /v3/style_rules/{style_id}/custom_instructions/{instruction_id}` + +Replace an existing custom instruction within a style rule list. All fields must be provided. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: replace custom instruction + curl -X PUT 'https://api.deepl.com/v3/style_rules/{style_id}/custom_instructions/{instruction_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ + --header 'Content-Type: application/json' \ + --data '{ + "label": "Updated currency instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + }' + ``` + + ```json Example response + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Updated currency instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ``` + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: replace custom instruction + PUT /v3/style_rules/{style_id}/custom_instructions/{instruction_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + Content-Length: 145 + Content-Type: application/json + + { + "label": "Updated currency instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ``` + + ```json Example response + { + "id": "f4515921-8fdf-4e3a-a981-ad7a6717a8aa", + "label": "Updated currency instruction", + "prompt": "Put currency symbols after the numeric amount", + "source_language": "en" + } + ``` + + + +#### Request body parameters + + + The updated label for the custom instruction. Maximum length: 100 characters. - -The index of the first page to return. Default: 0 (the first page). Use with `page_size` to get the next page of rule lists. + + The updated instruction text. Maximum length: 300 characters. - -The maximum number of style rule lists to return. Default: 10. Minimum: 1. Maximum: 25. + + Optional source language code for the custom instruction (e.g., `en`, `de`, `fr`). + +### Delete a custom instruction + +`DELETE /v3/style_rules/{style_id}/custom_instructions/{instruction_id}` + +Delete a specific custom instruction from a style rule list. This operation cannot be undone. + + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```sh Example request: delete custom instruction + curl -X DELETE 'https://api.deepl.com/v3/style_rules/{style_id}/custom_instructions/{instruction_id}' \ + --header 'Authorization: DeepL-Auth-Key [yourAuthKey]' + ``` + + Returns a `204 No Content` status code on successful deletion. The response body will be empty. If the custom instruction is not found, a `404` error will be returned. + + + The example below uses our API Pro endpoint `https://api.deepl.com`. If you're an API Free user, remember to update your requests to use `https://api-free.deepl.com` instead. + + ```http Example request: delete custom instruction + DELETE /v3/style_rules/{style_id}/custom_instructions/{instruction_id} HTTP/2 + Host: api.deepl.com + Authorization: DeepL-Auth-Key [yourAuthKey] + User-Agent: YourApp/1.2.3 + ``` + + Returns a `204 No Content` status code on successful deletion. The response body will be empty. If the custom instruction is not found, a `404` error will be returned. + + + +## Using style rules + +### In translation requests + +To use a style rule list in a translation request, include its `style_id` parameter in your translation call. For more information on using style rules in translations, see the [translation documentation](/api-reference/translate). + +```sh Example: translate with style rules +curl -X POST 'https://api.deepl.com/v2/translate' \ +--header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \ +--header 'Content-Type: application/json' \ +--data '{ + "text": ["Das Treffen ist um 15:00 Uhr"], + "source_lang": "DE", + "target_lang": "EN", + "style_id": "a74d88fb-ed2a-4943-a664-a4512398b994" +}' +``` + + + 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. + diff --git a/api-reference/style-rules/create-custom-instruction.mdx b/api-reference/style-rules/create-custom-instruction.mdx new file mode 100644 index 00000000..1dfe0170 --- /dev/null +++ b/api-reference/style-rules/create-custom-instruction.mdx @@ -0,0 +1,4 @@ +--- +openapi: post /v3/style_rules/{style_id}/custom_instructions +title: "Create a custom instruction" +--- diff --git a/api-reference/style-rules/create-style-rule.mdx b/api-reference/style-rules/create-style-rule.mdx new file mode 100644 index 00000000..f9690c27 --- /dev/null +++ b/api-reference/style-rules/create-style-rule.mdx @@ -0,0 +1,4 @@ +--- +openapi: post /v3/style_rules +title: "Create a style rule list" +--- diff --git a/api-reference/style-rules/delete-custom-instruction.mdx b/api-reference/style-rules/delete-custom-instruction.mdx new file mode 100644 index 00000000..9f248d19 --- /dev/null +++ b/api-reference/style-rules/delete-custom-instruction.mdx @@ -0,0 +1,4 @@ +--- +openapi: delete /v3/style_rules/{style_id}/custom_instructions/{instruction_id} +title: "Delete a custom instruction" +--- diff --git a/api-reference/style-rules/delete-style-rule.mdx b/api-reference/style-rules/delete-style-rule.mdx new file mode 100644 index 00000000..082af868 --- /dev/null +++ b/api-reference/style-rules/delete-style-rule.mdx @@ -0,0 +1,4 @@ +--- +openapi: delete /v3/style_rules/{style_id} +title: "Delete a style rule list" +--- diff --git a/api-reference/style-rules/get-custom-instruction.mdx b/api-reference/style-rules/get-custom-instruction.mdx new file mode 100644 index 00000000..e16be4a6 --- /dev/null +++ b/api-reference/style-rules/get-custom-instruction.mdx @@ -0,0 +1,4 @@ +--- +openapi: get /v3/style_rules/{style_id}/custom_instructions/{instruction_id} +title: "Get a custom instruction" +--- diff --git a/api-reference/style-rules/get-style-rule.mdx b/api-reference/style-rules/get-style-rule.mdx new file mode 100644 index 00000000..4c84edf0 --- /dev/null +++ b/api-reference/style-rules/get-style-rule.mdx @@ -0,0 +1,4 @@ +--- +openapi: get /v3/style_rules/{style_id} +title: "Get a style rule list" +--- diff --git a/api-reference/style-rules/update-configured-rules.mdx b/api-reference/style-rules/update-configured-rules.mdx new file mode 100644 index 00000000..4e959e53 --- /dev/null +++ b/api-reference/style-rules/update-configured-rules.mdx @@ -0,0 +1,4 @@ +--- +openapi: put /v3/style_rules/{style_id}/configured_rules +title: "Replace configured rules" +--- diff --git a/api-reference/style-rules/update-custom-instruction.mdx b/api-reference/style-rules/update-custom-instruction.mdx new file mode 100644 index 00000000..1d2a1353 --- /dev/null +++ b/api-reference/style-rules/update-custom-instruction.mdx @@ -0,0 +1,4 @@ +--- +openapi: put /v3/style_rules/{style_id}/custom_instructions/{instruction_id} +title: "Replace a custom instruction" +--- diff --git a/api-reference/style-rules/update-style-rule.mdx b/api-reference/style-rules/update-style-rule.mdx new file mode 100644 index 00000000..32302366 --- /dev/null +++ b/api-reference/style-rules/update-style-rule.mdx @@ -0,0 +1,4 @@ +--- +openapi: patch /v3/style_rules/{style_id} +title: "Update a style rule list" +--- diff --git a/docs.json b/docs.json index 86142723..b9cd2b35 100644 --- a/docs.json +++ b/docs.json @@ -185,7 +185,16 @@ "group": "Style rules", "pages": [ "api-reference/style-rules", - "api-reference/style-rules/list-all-style-rules" + "api-reference/style-rules/list-all-style-rules", + "api-reference/style-rules/create-style-rule", + "api-reference/style-rules/get-style-rule", + "api-reference/style-rules/update-style-rule", + "api-reference/style-rules/update-configured-rules", + "api-reference/style-rules/delete-style-rule", + "api-reference/style-rules/create-custom-instruction", + "api-reference/style-rules/get-custom-instruction", + "api-reference/style-rules/update-custom-instruction", + "api-reference/style-rules/delete-custom-instruction" ] }, { diff --git a/docs/getting-started/supported-languages.mdx b/docs/getting-started/supported-languages.mdx index bf18d4d2..c9081c16 100644 --- a/docs/getting-started/supported-languages.mdx +++ b/docs/getting-started/supported-languages.mdx @@ -17,3 +17,7 @@ import { LanguageTable } from "/snippets/language-table.jsx" Text improvement languages have not yet been added to the [`/languages` endpoint](/api-reference/languages/retrieve-supported-languages). For `/write/rephrase`, `writing_style` and `tone` currently work in `DE`, `EN-GB`, and `EN-US`. + + + Style rules are supported for the following target languages: `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, and `zh`. For more details, see the [Style Rules API documentation](/api-reference/style-rules). + diff --git a/docs/resources/roadmap-and-release-notes.mdx b/docs/resources/roadmap-and-release-notes.mdx index fa6eb751..cfb2904c 100644 --- a/docs/resources/roadmap-and-release-notes.mdx +++ b/docs/resources/roadmap-and-release-notes.mdx @@ -18,6 +18,16 @@ rss: true - Note: 12 supported languages using three-letter base codes (e.g. ACE, CEB, CKB) are not yet included in `v2/languages` for backwards compatibility, but will be available in the upcoming `v3/languages` endpoint. + +## February 15 - Expanded Style Rules API + +Expanded the Style Rules API with comprehensive endpoints for programmatic style rules management: +- Added 4 new endpoints for style rule list operations: create, retrieve, update, and delete +- Added 4 new endpoints for managing custom instructions within style rule lists + +See the [Style Rules API reference](/api-reference/style-rules) for complete documentation. + + ## January 20 - Legacy Auth Deprecation diff --git a/snippets/language-table.jsx b/snippets/language-table.jsx index 2b3aa028..5474048f 100644 --- a/snippets/language-table.jsx +++ b/snippets/language-table.jsx @@ -6,139 +6,140 @@ export const LanguageTable = () => { translation: false, glossaries: false, tagHandling: false, - textImprovement: false + textImprovement: false, + styleRules: false }) // Language data with individual feature support const languageData = [ // Fully supported languages (source + target + glossaries + tag handling) - { code: 'AR', name: 'Arabic', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'BG', name: 'Bulgarian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'CS', name: 'Czech', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'DA', name: 'Danish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'DE', name: 'German', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'EL', name: 'Greek', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'EN', name: 'English (all variants)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'ES', name: 'Spanish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'ET', name: 'Estonian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'FI', name: 'Finnish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'FR', name: 'French', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'HU', name: 'Hungarian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'ID', name: 'Indonesian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'IT', name: 'Italian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'JA', name: 'Japanese', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'KO', name: 'Korean', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'LT', name: 'Lithuanian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'LV', name: 'Latvian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'NB', name: 'Norwegian Bokmål', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'NL', name: 'Dutch', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'PL', name: 'Polish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'PT', name: 'Portuguese (unspecified variant)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'RO', name: 'Romanian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'RU', name: 'Russian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'SK', name: 'Slovak', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'SL', name: 'Slovenian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'SV', name: 'Swedish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'TR', name: 'Turkish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'UK', name: 'Ukrainian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'ZH', name: 'Chinese (unspecified variant)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false }, + { code: 'AR', name: 'Arabic', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'BG', name: 'Bulgarian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'CS', name: 'Czech', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'DA', name: 'Danish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'DE', name: 'German', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'EL', name: 'Greek', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'EN', name: 'English (all variants)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: true }, + { code: 'ES', name: 'Spanish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'ET', name: 'Estonian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'FI', name: 'Finnish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'FR', name: 'French', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'HU', name: 'Hungarian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'ID', name: 'Indonesian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'IT', name: 'Italian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'JA', name: 'Japanese', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'KO', name: 'Korean', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: true }, + { code: 'LT', name: 'Lithuanian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'LV', name: 'Latvian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'NB', name: 'Norwegian Bokmål', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'NL', name: 'Dutch', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'PL', name: 'Polish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'PT', name: 'Portuguese (unspecified variant)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: true, styleRules: false }, + { code: 'RO', name: 'Romanian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'RU', name: 'Russian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'SK', name: 'Slovak', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'SL', name: 'Slovenian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'SV', name: 'Swedish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'TR', name: 'Turkish', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'UK', name: 'Ukrainian', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'ZH', name: 'Chinese (unspecified variant)', translation: true, isVariant: false, glossaries: true, tagHandling: true, textImprovement: false, styleRules: true }, // Target-only language variants (cannot be used as source) - { code: 'EN-GB', name: 'English (British)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'EN-US', name: 'English (American)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'PT-BR', name: 'Portuguese (Brazilian)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'PT-PT', name: 'Portuguese (European)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false }, - { code: 'ZH-HANS', name: 'Chinese (simplified)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true }, - { code: 'ZH-HANT', name: 'Chinese (traditional)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false }, + { code: 'EN-GB', name: 'English (British)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true, styleRules: false }, + { code: 'EN-US', name: 'English (American)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true, styleRules: false }, + { code: 'PT-BR', name: 'Portuguese (Brazilian)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true, styleRules: false }, + { code: 'PT-PT', name: 'Portuguese (European)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, + { code: 'ZH-HANS', name: 'Chinese (simplified)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: true, styleRules: false }, + { code: 'ZH-HANT', name: 'Chinese (traditional)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, // Target-only variant - { code: 'ES-419', name: 'Spanish (Latin American)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false }, + { code: 'ES-419', name: 'Spanish (Latin American)', translation: true, isVariant: true, glossaries: true, tagHandling: true, textImprovement: false, styleRules: false }, // Text-only languages (both source and target, but no glossaries or tag handling) - { code: 'ACE', name: 'Acehnese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'AF', name: 'Afrikaans', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'AN', name: 'Aragonese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'AS', name: 'Assamese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'AY', name: 'Aymara', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'AZ', name: 'Azerbaijani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BA', name: 'Bashkir', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BE', name: 'Belarusian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BHO', name: 'Bhojpuri', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BN', name: 'Bengali', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BR', name: 'Breton', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'BS', name: 'Bosnian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'CA', name: 'Catalan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'CEB', name: 'Cebuano', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'CKB', name: 'Kurdish (Sorani)', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'CY', name: 'Welsh', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'EO', name: 'Esperanto', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'EU', name: 'Basque', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'FA', name: 'Persian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'GA', name: 'Irish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'GL', name: 'Galician', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'GN', name: 'Guarani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'GOM', name: 'Konkani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'GU', name: 'Gujarati', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'HA', name: 'Hausa', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'HE', name: 'Hebrew', translation: true, isVariant: false, glossaries: true, tagHandling: false, textImprovement: false }, - { code: 'HI', name: 'Hindi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'HR', name: 'Croatian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'HT', name: 'Haitian Creole', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'HY', name: 'Armenian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'IG', name: 'Igbo', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'IS', name: 'Icelandic', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'JV', name: 'Javanese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'KA', name: 'Georgian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'KK', name: 'Kazakh', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'KMR', name: 'Kurdish (Kurmanji)', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'KY', name: 'Kyrgyz', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'LA', name: 'Latin', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'LB', name: 'Luxembourgish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'LMO', name: 'Lombard', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'LN', name: 'Lingala', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MAI', name: 'Maithili', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MG', name: 'Malagasy', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MI', name: 'Maori', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MK', name: 'Macedonian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'ML', name: 'Malayalam', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MN', name: 'Mongolian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MR', name: 'Marathi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MS', name: 'Malay', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MT', name: 'Maltese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'MY', name: 'Burmese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'NE', name: 'Nepali', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'OC', name: 'Occitan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'OM', name: 'Oromo', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'PA', name: 'Punjabi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'PAG', name: 'Pangasinan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'PAM', name: 'Kapampangan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'PRS', name: 'Dari', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'PS', name: 'Pashto', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'QU', name: 'Quechua', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SA', name: 'Sanskrit', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SCN', name: 'Sicilian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SQ', name: 'Albanian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SR', name: 'Serbian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'ST', name: 'Sesotho', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SU', name: 'Sundanese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'SW', name: 'Swahili', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TA', name: 'Tamil', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TE', name: 'Telugu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TG', name: 'Tajik', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TH', name: 'Thai', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TK', name: 'Turkmen', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TL', name: 'Tagalog', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TN', name: 'Tswana', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TS', name: 'Tsonga', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'TT', name: 'Tatar', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'UR', name: 'Urdu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'UZ', name: 'Uzbek', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'VI', name: 'Vietnamese', translation: true, isVariant: false, glossaries: true, tagHandling: false, textImprovement: false }, - { code: 'WO', name: 'Wolof', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'XH', name: 'Xhosa', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'YI', name: 'Yiddish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'YUE', name: 'Cantonese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, - { code: 'ZU', name: 'Zulu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false }, + { code: 'ACE', name: 'Acehnese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'AF', name: 'Afrikaans', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'AN', name: 'Aragonese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'AS', name: 'Assamese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'AY', name: 'Aymara', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'AZ', name: 'Azerbaijani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BA', name: 'Bashkir', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BE', name: 'Belarusian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BHO', name: 'Bhojpuri', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BN', name: 'Bengali', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BR', name: 'Breton', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'BS', name: 'Bosnian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'CA', name: 'Catalan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'CEB', name: 'Cebuano', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'CKB', name: 'Kurdish (Sorani)', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'CY', name: 'Welsh', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'EO', name: 'Esperanto', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'EU', name: 'Basque', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'FA', name: 'Persian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'GA', name: 'Irish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'GL', name: 'Galician', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'GN', name: 'Guarani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'GOM', name: 'Konkani', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'GU', name: 'Gujarati', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HA', name: 'Hausa', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HE', name: 'Hebrew', translation: true, isVariant: false, glossaries: true, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HI', name: 'Hindi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HR', name: 'Croatian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HT', name: 'Haitian Creole', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'HY', name: 'Armenian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'IG', name: 'Igbo', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'IS', name: 'Icelandic', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'JV', name: 'Javanese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'KA', name: 'Georgian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'KK', name: 'Kazakh', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'KMR', name: 'Kurdish (Kurmanji)', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'KY', name: 'Kyrgyz', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'LA', name: 'Latin', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'LB', name: 'Luxembourgish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'LMO', name: 'Lombard', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'LN', name: 'Lingala', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MAI', name: 'Maithili', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MG', name: 'Malagasy', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MI', name: 'Maori', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MK', name: 'Macedonian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'ML', name: 'Malayalam', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MN', name: 'Mongolian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MR', name: 'Marathi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MS', name: 'Malay', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MT', name: 'Maltese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'MY', name: 'Burmese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'NE', name: 'Nepali', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'OC', name: 'Occitan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'OM', name: 'Oromo', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'PA', name: 'Punjabi', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'PAG', name: 'Pangasinan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'PAM', name: 'Kapampangan', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'PRS', name: 'Dari', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'PS', name: 'Pashto', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'QU', name: 'Quechua', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SA', name: 'Sanskrit', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SCN', name: 'Sicilian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SQ', name: 'Albanian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SR', name: 'Serbian', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'ST', name: 'Sesotho', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SU', name: 'Sundanese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'SW', name: 'Swahili', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TA', name: 'Tamil', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TE', name: 'Telugu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TG', name: 'Tajik', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TH', name: 'Thai', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TK', name: 'Turkmen', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TL', name: 'Tagalog', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TN', name: 'Tswana', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TS', name: 'Tsonga', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'TT', name: 'Tatar', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'UR', name: 'Urdu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'UZ', name: 'Uzbek', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'VI', name: 'Vietnamese', translation: true, isVariant: false, glossaries: true, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'WO', name: 'Wolof', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'XH', name: 'Xhosa', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'YI', name: 'Yiddish', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'YUE', name: 'Cantonese', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, + { code: 'ZU', name: 'Zulu', translation: true, isVariant: false, glossaries: false, tagHandling: false, textImprovement: false, styleRules: false }, ] // Filter and sort data @@ -198,7 +199,8 @@ export const LanguageTable = () => { translation: false, glossaries: false, tagHandling: false, - textImprovement: false + textImprovement: false, + styleRules: false }) } @@ -222,6 +224,7 @@ export const LanguageTable = () => { { key: 'glossaries', label: 'Glossaries' }, { key: 'tagHandling', label: 'Tag Handling' }, { key: 'textImprovement', label: 'Text Improvement' }, + { key: 'styleRules', label: 'Style Rules' }, ] return (
@@ -283,12 +286,13 @@ export const LanguageTable = () => { )}
-
+
{[ { key: 'translation', label: 'Translation' }, { key: 'glossaries', label: 'Glossaries' }, { key: 'tagHandling', label: 'Tag Handling', link: '/docs/xml-and-html-handling/xml' }, - { key: 'textImprovement', label: 'Text Improvement', link: '/api-reference/improve-text' } + { key: 'textImprovement', label: 'Text Improvement', link: '/api-reference/improve-text' }, + { key: 'styleRules', label: 'Style Rules', link: '/api-reference/style-rules' } ].map(({ key, label, link }) => (