> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/languages.md).

# Languages

`Languages` represent the available languages in the system. Each language can be activated or deactivated and is used for translations and localization throughout the application. Languages are managed by administrators and can be sorted for display purposes.

## Model Definition

### Attributes

| Key           | Type    | Description                                                                                       |
| ------------- | ------- | ------------------------------------------------------------------------------------------------- |
| `id`          | string  | The unique identifier of the `Language` ([BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)). |
| `locale`      | string  | The locale code ([ISO 639](https://ar-SA.wikipedia.org/wiki/List_of_ISO_639_language_codes)).     |
| `active`      | boolean | Whether the `Language` is active.                                                                 |
| `sort_number` | integer | The sort order for display.                                                                       |

### Available Languages

* `ar-SA` – Arabic
* `bg-BG` – Bulgarian
* `cs-CZ` – Czech
* `da-DK` – Danish
* `de-DE` – German
* `el-GR` – Greek
* `en-GB` – English (UK)
* `en-US` – English (US)
* `es-ES` – Spanish
* `et-EE` – Estonian
* `fi-FI` – Finnish
* `fr-FR` – French
* `he-IL` – Hebrew
* `hu-HU` – Hungarian
* `id-ID` – Indonesian
* `it-IT` – Italian
* `ja-JP` – Japanese
* `ko-KR` – Korean
* `lt-LT` – Lithuanian
* `lv-LV` – Latvian
* `nb-NO` – Norwegian Bokmål
* `nl-NL` – Dutch
* `pl-PL` – Polish
* `pt-BR` – Portuguese (Brazil)
* `pt-PT` – Portuguese (Portugal)
* `ro-RO` – Romanian
* `ru-RU` – Russian
* `sk-SK` – Slovak
* `sl-SI` – Slovenian
* `sv-SE` – Swedish
* `tr-TR` – Turkish
* `uk-UA` – Ukrainian
* `vi-VN` – Vietnamese
* `zh-Hans` – Chinese (Simplified)
* `zh-Hant` – Chinese (Traditional)

## List

Get a list of all `Languages` available to the current authenticated user.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/languages`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/languages', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": "ar-SA",
    "locale": "ar",
    "active": true,
    "sort_number": 1,
    "created_at": "2025-05-15 12:00:00",
    "updated_at": "2025-05-15 12:00:00"
  },
  {
    "id": "bg-BG",
    "locale": "bg",
    "active": true,
    "sort_number": 2,
    "created_at": "2025-05-15 12:00:00",
    "updated_at": "2025-05-15 12:00:00"
  }
]
```

## Show

Show a single `Language` by `id`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/languages/{language}`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/languages/ar-SA', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": "ar-SA",
  "locale": "ar",
  "active": true,
  "sort_number": 1,
  "created_at": "2025-05-15 12:00:00",
  "updated_at": "2025-05-15 12:00:00"
}
```

## \[Adm.] List

Get a list of all `Languages`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/languages`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/languages', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": "ar-SA",
    "locale": "ar",
    "active": true,
    "sort_number": 1,
    "created_at": "2025-05-15 12:00:00",
    "updated_at": "2025-05-15 12:00:00"
  },
  {
    "id": "bg-BG",
    "locale": "bg",
    "active": true,
    "sort_number": 2,
    "created_at": "2025-05-15 12:00:00",
    "updated_at": "2025-05-15 12:00:00"
  }
]
```

## \[Adm.] Show

Show a single `Language` by `id` .

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/languages/{language}`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/languages/ar-SA', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": "ar-SA",
  "locale": "ar",
  "active": true,
  "sort_number": 1,
  "created_at": "2025-05-15 12:00:00",
  "updated_at": "2025-05-15 12:00:00"
}
```

## Update

Update an existing `Language` by `id`.

**Definition**

<mark style="color:blue;">`PUT`</mark> `/api/administration/languages/{language}`

**Request Keys**

| Key           | Type    | Description                       |
| ------------- | ------- | --------------------------------- |
| `active`      | boolean | Whether the `Language` is active. |
| `sort_number` | integer | The sort order for display.       |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/languages/ar-SA', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'active' => false,
        'sort_number' => 2
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": "ar-SA",
    "locale": "ar",
    "active": false,
    "sort_number": 21,
    "created_at": "2025-05-15 12:00:00",
    "updated_at": "2025-05-15 12:30:00"
  }
}
```
