Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api-reference/glossaries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ User-Agent: YourApp/1.2.3
</Tabs>

### Listing language pairs
The `/glossary-language-pairs` endpoint lists all the language pairs - the source and target languages - that glossaries support. Since DeepL supports many glossary languages, this list is quite long. We recommend that you instead use [the /languages endpoint](/api-reference/languages).
The `/glossary-language-pairs` endpoint lists all the language pairs - the source and target languages - that glossaries support.

<Info>
Since DeepL supports many glossary languages, the list of potential pairs is quite long. [This list of glossary languages](/docs/getting-started/supported-languages#glossary-languages) may also be useful.
</Info>

<Tabs>
<Tab title="cURL">
Expand Down
12 changes: 7 additions & 5 deletions api-reference/multilingual-glossaries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ description: "Manage and use DeepL glossaries"

## Overview

The `glossaries` endpoints let you work with [DeepL glossaries](https://support.deepl.com/hc/en-us/articles/360021634540-About-the-glossary), which let you specify specific translations for words or short phrases. Each glossary contains a mapping of source phrases to target phrases. During translation, DeepL intelligently flexes entries to account for case, gender, tense, and other grammar features (if the target language has flexion).

Currently you can create glossaries with [any of the languages DeepL supports](../docs/getting-started/supported-languages) (with the exception of Thai). Any updates will be noted here, as well as in [the /languages endpoint and documentation](../docs/getting-started/supported-languages).
The `glossaries` endpoints let you work with [DeepL glossaries](https://support.deepl.com/hc/en-us/articles/360021634540-About-the-glossary), which let you specify specific translations for words or short phrases. Each glossary contains a mapping of source phrases to target phrases. During translation, DeepL intelligently flexes entries to account for case, gender, tense, and other grammar features (if the target language has flexion). You can create glossaries with [any of the languages listed here](/docs/getting-started/supported-languages#glossary-languages).

A **glossary** contains (several) **dictionaries**. A **dictionary** is a mapping of source phrases to target phrases for a single language pair, like this:

Expand Down Expand Up @@ -160,7 +158,7 @@ This example creates a modest glossary with two dictionaries. One maps "Hello" i
</Tab>
</Tabs>

## Using
## Using a glossary

`POST /v2/translate`

Expand Down Expand Up @@ -429,7 +427,7 @@ Currently you can only retrieve glossary contents in TSV format.
To retrieve the contents of an entire glossary, iterate through each of dictionaries, retrieving the content of each. While we work to provide the ability to retrieve a whole glossary in a single call, [your feedback here](/docs/resources/deepl-developer-community) is valuable as we strive to improve our API.
</Info>

## Editing
## Editing a glossary

### Add a new dictionary, or replace an existing one

Expand Down Expand Up @@ -689,6 +687,10 @@ Use this method to delete a dictionary for a specific language pair.

## Notes on usage

### Languages supported

The DeepL API supports [these languages for glossaries](/docs/getting-started/supported-languages#glossary-languages).

### Language variants

Glossaries apply to languages, not specific language variants. A glossary for a language applies to any variant of that language.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ openapi: "get /v2/glossary-language-pairs"
title: "List language pairs supported for glossaries"
playground: none
---

<Info>This endpoint returns all possible language pairs for glossaries.
[This list of supported languages](/docs/getting-started/supported-languages#glossary-languages) may also be useful.</Info>
41 changes: 40 additions & 1 deletion docs/getting-started/supported-languages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,44 @@ If trying to convert between variants of the same language (e.g. `EN-US` to `EN-

\* These languages only work with the `quality_optimized` model or when no model is specified. They are not compatible with requests that specify the `latency_optimized` model. These languages do not support glossaries or formality.

### Glossary languages

The following can be either source or target languages in a glossary.

- `AR` - Arabic
- `BG` - Bulgarian
- `CS` - Czech
- `DA` - Danish
- `DE` - German
- `EL` - Greek
- `EN` - English
- `ES` - Spanish
- `ET` - Estonian
- `FI` - Finnish
- `FR` - French
- `HE` - Hebrew
- `HU` - Hungarian
- `ID` - Indonesian
- `IT` - Italian
- `JA` - Japanese
- `KO` - Korean
- `LT` - Lithuanian
- `LV` - Latvian
- `NB` - Norwegian Bokmål
- `NL` - Dutch
- `PL` - Polish
- `PT` - Portuguese
- `RO` - Romanian
- `RU` - Russian
- `SK` - Slovak
- `SL` - Slovenian
- `SV` - Swedish
- `TH` - Thai
- `TR` - Turkish
- `UK` - Ukrainian
- `VI` - Vietnamese
- `ZH` - Chinese

### Text improvement languages (DeepL API for Write)

<Info>
Expand All @@ -270,4 +308,5 @@ If trying to convert between variants of the same language (e.g. `EN-US` to `EN-

<Info>
For the `/write/rephase` endpoint, `writing_style` and `tone` currently work in `DE`, `EN-GB`, and `EN-US`.
</Info>
</Info>