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

# Action `set_language`

> **System ID:** `action_set_language`

## Description

Sets the user's dialog language. The language code is taken from the `lang_code` constant and validated against the bot languages enabled for the dialog. Alias for the same logic: `action_language__set`.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | Language was 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, user constants must include:

| Constant | Type | Required | Description |
|----------|------|----------|-------------|
| `lang_code` | string | yes | Language code (e.g. `uk`, `en`) |

## Configuration example

Node config:

```json
{}
```

User constants (example):

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

## Related docs

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