Action language__set
System ID:
action_language__set
Also in the scenario:language__set
Alias of the same logic:set_language(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:
{}
User constants (example):
{
"lang_code": "uk"
}