On the BRYTER platform, modules can be displayed in different languages to end users. This tutorial describes how to enable end users to select their preferred language at the start of their module. To achieve this goal, we will start the module with a separate input node asking for the preferred language, then, reloading the module with the correct language URL parameter.
- At the top of your module, insert a URL Parameter action node. Name it Language.
- In the Language node, set QUERY PARAMETER NAME to lang and select TYPE Text.
- Below the Language node, create a new Single Select input node. Name it Language chooser.
-
Configure the condition so that the Language chooser node is only reached when the URL parameter Language is blank, that is, if this URL parameter was not provided. Otherwise, forward the end user to the actual start of the module (In our example, this is the Role node).
- In the Language chooser node, ask the end user to select a language and provide the available languages as answer options.
- Below the Language chooser node, create a new Text Block value node. Name it Convert language to value.
- In the Convert language to value nodeβs content field, place a conditional block for every language. Enter the language abbreviations and set the conditionsΒ to match the corresponding language.
- Below the Convert language to value node, create a Redirect Result node. Redirect to the module itself. Add a parameter with the key lang. In the value field, reference the Convert language to value node. This will ensure the module is reloaded with the correct language URL parameter attached.