There’s two separate issues here:
- Setting user’s language preference
- Displaying the page in selected language
For issue #2:
Presumably, your multi-language pages are already configured either with conditions on the text elements (when lang=x change text to y) or some other method. When you get data from the URL, set whatever value you are keying off of to the value you’ve retrieved from the URL parameter.
It could be that you’ve ONLY set up your multi-language pages to key off of the user’s stored language preference… Is that correct?
What I’d do is abstract that a bit. Have a custom state on the page which is used to store the preferred language. Key your conditional displaying of multi-lingual text off of THAT.
Then, on page load, establish whether we know if the visitor has a language preference. (1) If the user is logged in and has a set language preference, use that preference (set the custom state to that value). (2) If the URL has the language parameter, use that as the preference (and this should probably override the user language preference). (3) If neither of these things, use the default language (and perhaps this also causes your flags or language select dropdown to be more prominently displayed?).
As for #1, note that you can write to Current User even on visitors who have not converted to signed up users. Bubble’s mechanism for this seems to be creating a temporary User object in the database, combined with tying that the the browser using cookies. If the user converts before those things expire, the data fields you’ve written on their User object will remain intact.
Point is, you can set an unknown visitors preferences and they may be persistent across visits (if the User’s browser allows cookies, etc.). That is, you can Make Changes to a Thing on Current User at any time.
A user who HAS converted, should be accessing your site logged in and they aren’t likely to be going through your onboarding flow again, but that’s always possible.
Hope this is helpful rather than confusing… Just trying to point you in the right direction in terms of how you might think about these issues!