You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-reference/languages/migrate-from-v2-languages.mdx
+31-21Lines changed: 31 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,18 +20,18 @@ GET /v2/languages?type=source
20
20
GET /v2/languages?type=target
21
21
```
22
22
23
-
v3 uses a single endpoint that returns all languages for a product, with each language indicating whether it is
23
+
v3 uses a single endpoint that returns all languages for a resource, with each language indicating whether it is
24
24
usable as a source, a target, or both:
25
25
26
26
```
27
-
GET /v3/languages?product=translate_text
27
+
GET /v3/languages?resource=translate_text
28
28
```
29
29
30
-
### New product identifiers
30
+
### New resource identifiers
31
31
32
-
v2 languages are implicitly tied to text and document translation. v3 introduces an explicit `product` parameter that applies across all DeepL API products:
32
+
v2 languages are implicitly tied to text and document translation. v3 introduces an explicit `resource` parameter that applies across all DeepL API resources:
@@ -43,16 +43,16 @@ The v3 endpoints replace both `/v2/languages` and `/v2/glossary-language-pairs`.
43
43
44
44
### Features instead of `supports_formality`
45
45
46
-
v2 target languages include a boolean `supports_formality` field. v3 replaces this with a `features`array that covers additional capabilities per product:
46
+
v2 target languages include a boolean `supports_formality` field. v3 replaces this with a `features`object that covers additional capabilities per resource:
47
47
48
-
| v2 field | v3 equivalent |
48
+
|**v2 field**|**v3 equivalent**|
49
49
|---|---|
50
-
|`"supports_formality": true`|`"features": ["formality"]` on the language object |
50
+
|`"supports_formality": true`|`"formality"` key present in the language's `features` object |
51
51
52
52
For example, querying languages for text translation:
53
53
54
54
```sh
55
-
curl -X GET 'https://api.deepl.com/v3/languages?product=translate_text' \
55
+
curl -X GET 'https://api.deepl.com/v3/languages?resource=translate_text' \
|`supports_formality`|`"formality"` key in `features` object |
98
+
|*(not present)*|`status`|
89
99
90
100
### Language code casing
91
101
@@ -97,6 +107,6 @@ DeepL accepts language codes case-insensitively as input across all endpoints. H
97
107
98
108
If you currently use `/v2/glossary-language-pairs` to discover which language pairs are supported for glossaries, use one of the following:
99
109
100
-
-`GET /v3/languages?product=glossary` to check which languages support glossary management (i.e. creating a glossary for that language). Filter by `usable_as_source` and `usable_as_target` as needed. Any combination of a valid source and target language is a supported glossary language pair.
101
-
-`GET /v3/languages?product=translate_text` to check which languages support using a glossary during text translation. Languages that include`"glossary"` in their `features`array support the `glossary_id` parameter on the translate endpoint.
102
-
- Similarly, use `product=translate_document` to check glossary support for document translation.
110
+
-`GET /v3/languages?resource=glossary` to check which languages support glossary management (i.e. creating a glossary for that language). Filter by `usable_as_source` and `usable_as_target` as needed. Any combination of a valid source and target language is a supported glossary language pair.
111
+
-`GET /v3/languages?resource=translate_text` to check which languages support using a glossary during text translation. Languages with a`"glossary"`key in their `features`object support the `glossary_id` parameter on the translate endpoint.
112
+
- Similarly, use `resource=translate_document` to check glossary support for document translation.
description: "Learn how to retrieve the list of DeepL API resources and their supported language features."
5
6
---
6
7
7
8
<Info>
8
9
This endpoint is available for testing in BETA. Breaking changes may be pushed with little or no advance notice, and we provide no guarantees of stability.
0 commit comments