Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document /api/v1/instance/translation_languages #1189

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions content/en/methods/instance.md
Expand Up @@ -488,6 +488,36 @@ Obtain an extended description of this server

---

## View translation languages {#translation_languages}

```http
GET /api/v1/instance/translation_languages HTTP/1.1
```

Translation language pairs supported by the translation engine used by the server.

**Returns:** Object with source language codes as keys and arrays of target language codes as values.\
**OAuth:** Public\
**Version history:**\
4.2.0 - added

#### Response
##### 200: OK

All source and target language pairs supported by the server.

In the following sample response showing support for translating a status written in English (`en`) into German (`de`) or Spanish (`es`). The source language code `und` indicates that the server supports auto-detection the language of statuses with an empty `language` attribute and translating these into either British English (`en-GB`), German or Spanish.

```json
{
"en": ["de", "es"],
// [...]
"und": ["en-GB", "de", "es"]
}
```

---

## (DEPRECATED) View server information (V1) {#v1}

```http
Expand Down