---
title: "Action language__set"
description: "Sets the user's selected language by the code from the lang_code constant."
---

# Action `language__set`

> **System ID:** `action_language__set`  
> Also in the scenario: `language__set`  
> Alias of the same logic: [`set_language`](/en/actionjail/reference/actions/set_language.md) (`action_set_language`).

## Description

Sets the user's dialog language. The language code is taken from the `lang_code` constant and checked against the bot languages enabled for the dialog (`used_in_dialog`). On success, `selected_lang_code` and `lang_code` in state are updated.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | Language set and validated |
| **error** | No `lang_code` in constants, or the code is not among the bot's available languages |

## Parameters

No parameters in the node JSON (`{}`).

Before execution, the user constants must include:

| Constant | Type | Required | Description |
|----------|------|----------|-------------|
| `lang_code` | string | yes | Language code (for example, `uk`, `en`) |

## Configuration example

Node config:

```json
{}
```

User constants (example):

```json
{
  "lang_code": "uk"
}
```

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
- [Action set_language](/en/actionjail/reference/actions/set_language.md)
- [Action language__get](/en/actionjail/reference/actions/language__get.md)
