# 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"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.api.intratool.de/api-reference/languages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
