Skip to content

Commit cf22ffb

Browse files
Merge pull request #271 from DeepLcom/v3-languages-required-wording
v3/languages: improve wording around features "required"
2 parents 80f29a4 + 361ec75 commit cf22ffb

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

api-reference/languages/language-feature-use-cases.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ render target_dropdown(target_options)
3939

4040
## Show formality options only when supported
4141

42-
`formality` is a target-only feature. Check the selected target language's `features` array — no need to look
43-
at the source language.
42+
`formality` only needs to be supported by the target language. Check the selected target language's `features`
43+
array — no need to look at the source language.
4444

4545
```
4646
GET /v3/languages?product=translate_text
@@ -58,7 +58,7 @@ else:
5858

5959
## Check if a glossary can be used for a given language pair
6060

61-
`glossary` is a source-and-target feature — both languages must support it.
61+
`glossary` must be supported by both languages.
6262

6363
```
6464
GET /v3/languages?product=translate_text
@@ -116,8 +116,8 @@ else:
116116

117117
## Determine feature support programmatically
118118

119-
Use `/v3/languages/products` to drive feature checks at runtime — without hardcoding which features are
120-
target-only or source-and-target into your client.
119+
Use `/v3/languages/products` to drive feature checks at runtime — without hardcoding which features need
120+
target-only or both-language support into your client.
121121

122122
```
123123
GET /v3/languages/products

api-reference/languages/retrieve-supported-languages-by-product.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,24 @@ User-Agent: YourApp/1.2.3
117117
Each language object includes a `features` array indicating which optional capabilities are supported for that language
118118
with the requested product.
119119

120-
A feature may be required on the source language, the target language, or both. For example, for text translation:
120+
To use a feature, one or both languages in the pair must support it. For example, for text translation:
121121

122-
- **Target-only**: `formality` is required only on the target language. Check that `"formality"` is present in the
123-
target language's `features` array.
124-
- **Source-and-target**: `tag_handling` and `glossary` are required on both languages. Check that the feature is
125-
present in *both* the source and target language's `features` arrays.
122+
- **Target-only**: `formality` only needs to be supported by the target language. Check that `"formality"` is
123+
present in the target language's `features` array.
124+
- **Source-and-target**: `tag_handling` and `glossary` must be supported by both languages. Check that the
125+
feature is present in *both* the source and target language's `features` arrays.
126126

127-
Source-only features are also supported by the schema, though none exist currently.
127+
Source-only features are also supported by the schema, and may be introduced in future products.
128128

129129
In the documentation for API features that are supported for only a subset of languages, we specify
130130
which language feature value to check, and whether to check the source language, target language, or both.
131131

132132
## Retrieving products programmatically
133133

134134
Use the `/v3/languages/products` endpoint to retrieve the list of products and their features programmatically.
135-
For each feature, the response indicates whether support is required on the source language, the target language,
136-
or both — allowing clients to determine feature availability for a language pair by checking the appropriate
137-
`features` arrays.
135+
For each feature, the response indicates which languages must support it for the feature to be available —
136+
source only, target only, or both — allowing clients to determine feature availability for a language pair
137+
by checking the appropriate `features` arrays.
138138

139139
```sh
140140
curl -X GET 'https://api.deepl.com/v3/languages/products' \

api-reference/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,10 +1955,10 @@ paths:
19551955
description: |-
19561956
Returns all DeepL API products, including the API endpoints they expose, and the features they support.
19571957
1958-
For each feature, the response indicates whether support is required on the source language
1959-
(`required_on_source`), the target language (`required_on_target`), or both. This allows
1960-
clients to determine feature availability for a language pair by checking the appropriate language's
1961-
`features` array returned by `GET /v3/languages`.
1958+
For each feature, the response indicates which languages must support it for the feature to be
1959+
available — source only (`required_on_source`), target only (`required_on_target`), or both.
1960+
This allows clients to determine feature availability for a language pair by checking the
1961+
appropriate language's `features` array returned by `GET /v3/languages`.
19621962
responses:
19631963
200:
19641964
description: JSON array where each item represents a DeepL API product.
@@ -1995,8 +1995,8 @@ paths:
19951995
- v2/translate
19961996
features:
19971997
description: |-
1998-
Features supported by this product. Each feature indicates whether support is
1999-
required on the source language, the target language, or both.
1998+
Features supported by this product. Each feature indicates which languages
1999+
must support it for the feature to be available — source, target, or both.
20002000
type: array
20012001
items:
20022002
type: object
@@ -2014,10 +2014,10 @@ paths:
20142014
- writing_style
20152015
- tone
20162016
required_on_source:
2017-
description: Whether support for this feature is required on the source language. Defaults to `false` if absent.
2017+
description: If `true`, the source language must support this feature for it to be available. Defaults to `false` if absent.
20182018
type: boolean
20192019
required_on_target:
2020-
description: Whether support for this feature is required on the target language. Defaults to `false` if absent.
2020+
description: If `true`, the target language must support this feature for it to be available. Defaults to `false` if absent.
20212021
type: boolean
20222022
example:
20232023
- name: translate_text

0 commit comments

Comments
 (0)