New Features
Language Control Commands in the Custom Script Element
You can now manage language selection and visibility directly inside a Custom Script element using the following new commands:- Switch language —
switchLanguage("en")switches the flow to another valid language that already exists in your project. - Deactivate language —
activateLanguage("de", false)hides a language from the language selection screen. - Activate language —
activateLanguage("sp", true)makes a previously hidden language visible again in the language selection screen. - Show language switch —
showLanguageSwitch("true")displays the language switch button in the top-left corner of the Avatar. - Hide language switch —
showLanguageSwitch("false")hides the language switch button in the top-left corner of the Avatar.
New System Variables
Two new system variables are now available for use in conditions throughout your flows:AvailableLanguages
Contains all languages that are currently active in your project. You can use the contain or not contain operators to branch your flow based on which languages are enabled.
FlowState
Tracks how the current flow state was triggered. Use the is or is not operators with the following possible values:
user-home-button— the user clicked the home button in the Avatar’s top-left corner.user-language-switch— the user manually switched language via the language button.system-language-switch— the language was changed by a language switch element or a script command.system-back-to-start— a “Back-to-flow-start” element or output was triggered.system-start— the flow started because the Avatar detected a new user.
Improvements
- Unrestricted API call URLs — The URL validation check on API call elements has been removed. You can now enter any URL format you need; accuracy is your responsibility to verify.
- Per-language API call body — The request body of an API call element can now be edited individually for each language. Alternatively, you can enable auto-translation from the primary language, which locks the body from manual editing.
- Alphabetical variable/attribute ordering — Variables and attributes are now sorted by name in all selection menus, making large projects much easier to navigate.
- Help button links to documentation — The help button in the top-right corner of Plural now opens the official documentation website directly.
Cosmetics
- Language flags added — Flag icons have been added for all newly supported languages in the language selection interface.
The
AvailableLanguages and FlowState system variables are only available in Avatar projects. Make sure you test your conditions after upgrading to confirm expected behaviour.