Use Case: Selecting Language Preference

In an application, we want to allow users to manually select their preferred language. This preference improves the user experience and ensures that content is displayed in the same language in subsequent sessions.

Application Steps:

Add a Select Box element to the application interface.

  • This Select Box should be configured to contain the available languages:

When Language is Selected:

Define the actions to be performed when a change is made to the Select Box:

  • OnChange → Set Language
  • Sets the selected language as the active language of the application.
  • OnChange → Write to Local Storage
    • Value: Selected language
    • Key: userLanguage
    • This saves the user's preference to local storage.

When the application starts:

Add the following actions to automatically load the user's previous language preference:

  • OnLoad → Read from Local Storage
  • OnLoad → Set Language

Thanks to this process, the user will see the same language when they open the application next time.