Skip to content

Language Management

Manage the available languages in the system. Retrieve the list of supported languages, add new languages, or update existing language configurations such as display names, text direction (RTL/LTR), and IETF BCP 47 language tags.

Base path: /api/v1/languages

Method Endpoint Description
GET /api/v1/languages List All Languages
POST /api/v1/languages Create Language
GET /api/v1/languages/{name} Get Language
PUT /api/v1/languages/{name} Update Language
DELETE /api/v1/languages/{name} Delete Language

List All Languages

GET /api/v1/languages

Requires Authentication - Scopes: speech:languages:read

Retrieve a list of all available languages in the system.

curl -X GET "https://koldan.dixilang.com/api/v1/languages" \
  -H "X-API-Key: $KOLDAN_API_KEY"
import requests

resp = requests.get(
    "https://koldan.dixilang.com/api/v1/languages",
    headers={"Authorization": f"Bearer {JWT}"}
)
print(resp.json())
LanguageDTO[]

Returns an array of language objects. See LanguageDTO for details.

LanguageDTO[]
[
  {
    "name": "hebrew",
    "localDisplayName": "עברית",
    "globalDisplayName": "Hebrew",
    "rtl": true,
    "langTag": "he"
  },
  {
    "name": "english",
    "localDisplayName": "English",
    "globalDisplayName": "English",
    "rtl": false,
    "langTag": "en"
  }
]
Status Description
200 OK Languages retrieved successfully.
204 No Content No languages found in the system.
401 Unauthorized Missing or invalid authentication.
403 Forbidden Insufficient scope.

Create Language

POST /api/v1/languages

Requires Authentication - Scopes: speech:languages:write

Create a new language with the specified details.

LanguageDTO
Field Type Required Description
name string Yes Unique internal name for the language (e.g., hebrew).
localDisplayName string No Display name in the language itself (e.g., עברית).
globalDisplayName string No Universal display name (e.g., Hebrew).
rtl boolean No Whether the language is written right-to-left. Default: false.
langTag string No IETF BCP 47 language tag (e.g., he, en-US).
LanguageDTO
{
  "name": "german",
  "localDisplayName": "Deutsch",
  "globalDisplayName": "German",
  "rtl": false,
  "langTag": "de"
}
curl -X POST "https://koldan.dixilang.com/api/v1/languages" \
  -H "X-API-Key: $KOLDAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "german",
    "localDisplayName": "Deutsch",
    "globalDisplayName": "German",
    "rtl": false,
    "langTag": "de"
  }'
import requests

resp = requests.post(
    "https://koldan.dixilang.com/api/v1/languages",
    headers={
        "Authorization": f"Bearer {JWT}",
        "Content-Type": "application/json"
    },
    json={
        "name": "german",
        "localDisplayName": "Deutsch",
        "globalDisplayName": "German",
        "rtl": False,
        "langTag": "de"
    }
)
print(resp.json())
LanguageDTO

Returns the created language object.

Status Description
201 Created Language created successfully.
401 Unauthorized Missing or invalid authentication.
403 Forbidden Insufficient scope.
500 Internal Server Error An error occurred while saving the language.

Get Language

GET /api/v1/languages/{name}

Requires Authentication - Scopes: speech:languages:read

Retrieve details for a specific language by its unique name.

Path Parameters
Parameter Type Required Description
name string Yes Unique internal name of the language.
curl -X GET "https://koldan.dixilang.com/api/v1/languages/hebrew" \
  -H "X-API-Key: $KOLDAN_API_KEY"
import requests

resp = requests.get(
    "https://koldan.dixilang.com/api/v1/languages/hebrew",
    headers={"Authorization": f"Bearer {JWT}"}
)
print(resp.json())
LanguageDTO

Returns the requested language object.

Status Description
200 OK Language retrieved successfully.
401 Unauthorized Missing or invalid authentication.
403 Forbidden Insufficient scope.
404 Not Found Language with the specified name does not exist.

Update Language

PUT /api/v1/languages/{name}

Requires Authentication - Scopes: speech:languages:write

Update the details of an existing language. The internal name cannot be changed via this endpoint.

Path Parameters
Parameter Type Required Description
name string Yes Unique internal name of the language to update.
LanguageUpdateDTO
Field Type Required Description
localDisplayName string No Updated local display name.
globalDisplayName string No Updated global display name.
rtl boolean No Updated text direction (RTL/LTR).
langTag string No Updated IETF BCP 47 language tag.
LanguageUpdateDTO
{
  "localDisplayName": "עברית (ישראל)",
  "langTag": "he-IL"
}
curl -X PUT "https://koldan.dixilang.com/api/v1/languages/hebrew" \
  -H "X-API-Key: $KOLDAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "localDisplayName": "עברית (ישראל)",
    "langTag": "he-IL"
  }'
import requests

resp = requests.put(
    "https://koldan.dixilang.com/api/v1/languages/hebrew",
    headers={
        "Authorization": f"Bearer {JWT}",
        "Content-Type": "application/json"
    },
    json={
        "localDisplayName": "עברית (ישראל)",
        "langTag": "he-IL"
    }
)
print(resp.json())
LanguageDTO

Returns the updated language object.

Status Description
200 OK Language updated successfully.
401 Unauthorized Missing or invalid authentication.
403 Forbidden Insufficient scope.
404 Not Found Language with the specified name does not exist.

Delete Language

DELETE /api/v1/languages/{name}

Requires Authentication - Scopes: speech:languages:delete

Permanently delete a language from the system.

Path Parameters
Parameter Type Required Description
name string Yes Unique internal name of the language to delete.
curl -X DELETE "https://koldan.dixilang.com/api/v1/languages/german" \
  -H "X-API-Key: $KOLDAN_API_KEY"
import requests

resp = requests.delete(
    "https://koldan.dixilang.com/api/v1/languages/german",
    headers={"Authorization": f"Bearer {JWT}"}
)
print(resp.status_code) # 200
Response

No response body.

Status Description
200 OK Language deleted successfully.
401 Unauthorized Missing or invalid authentication.
403 Forbidden Insufficient scope.
404 Not Found Language with the specified name does not exist.

Data Types

LanguageDTO

Field Type Nullable Description
name string No Unique internal name for the language.
localDisplayName string Yes Display name in the language itself.
globalDisplayName string Yes Universal display name.
rtl boolean Yes Whether the language is written right-to-left.
langTag string Yes IETF BCP 47 language tag.

LanguageUpdateDTO

Field Type Nullable Description
localDisplayName string Yes Updated display name in the language itself.
globalDisplayName string Yes Updated universal display name.
rtl boolean Yes Updated text direction (RTL/LTR).
langTag string Yes Updated IETF BCP 47 language tag.