From 5bed9cfe820052a4ba95118adbc0509ec8bbe6f9 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 8 Dec 2023 22:23:03 +0100 Subject: [PATCH] Document /api/v1/instance/translation_languages (#1189) --- content/en/methods/instance.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/en/methods/instance.md b/content/en/methods/instance.md index a6f1823c..072caa23 100644 --- a/content/en/methods/instance.md +++ b/content/en/methods/instance.md @@ -491,6 +491,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