跳到主要内容

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.