---
title: "Action get_language"
description: "Returns the user's selected language code or the error branch."
---

# Action `get_language`

> **System ID:** `action_get_language`

## Description

Returns the user's language code. Looks first in the `lang_code` constant, then in the `selected_lang_code` state. If no language is set — **error** branch. The result (for example, `uk`, `en`) can be used for scenario branching.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| language code (dynamic) | Language found — the code itself is returned (`uk`, `en`, …) |
| **error** | Language is not set |

Configure scenario branches for the bot's actual language codes.

## Parameters

No parameters (`{}`).

## Configuration example

```json
{}
```

## Related docs

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