I’m trying to figure out how would work a preferred language option.
- preferred language stored in the user table in Xano
- preferred language switch with the language dropdown widget in Weweb
- variable to store the preferred language throughout the user session
-
Concerning the preferred language set up/switch:
a. User sign ups (no language preference set up) > language versions follows automatically the browser language
Next, we need to get the user’s browser language / language detected by Weweb so that we can save it as the user’s preferred language (stored in the user and in the variable).
Can it be done only with javascript?
b. User changes the preferred language > similarly, we save it to the database and in the variable: with a workflow triggered by the language dropdown widget -
Concerning the preferred language version to display throughout the user session
a. On page load, we set a page workflow that retrieves the stored preferred language in the language dropdown and we change language (if different) with the Change language workflow action.
Is that the right way?