Перейти к основному содержимому

Set Language Action

Set a player's translation language

Action to set a player's language. The language must be configured in TranslationConfigEntry. This will save the preference and execute any on-change actions defined for the language.

Поля

ПолеТипПо умолчаниюОписание
languageVar<String>—The language name to set (e.g., 'en_GB', 'fr_FR'). Must match a language configured in TranslationConfig. Supports placeholders.
Общие поля TypeWriter (triggers, criteria, modifiers)
ПолеТипПо умолчаниюОписание
triggersList<Ref<TriggerableEntry>>empty—
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—

How to use it​

language takes a configured language name (placeholders are supported). The player's language is saved and the onChangeActions of that language run. If the player already has this language nothing happens. Only this action fires the Player Language Change event; changing language with /translate or from the menu does not.