Hi,
I sow many questions about the translations of the texts, but how to make the language switcher?
My app is multi-pages, so I can’t store the current language as a page state.
Some of the pages don’t require the login, so I can’t use the users table to store the current language.
Where to store the current language state across pages?
Thanks.
Hi, even if a user is not logged in, a temporary user is created in Bubble. You can still modify a temporary user, so you should be able to store their language and retrieve it, as you would a permanent user.
As per the documentation, the temporary user will remain for three days so long as the cookies are not cleared. If the user signs up for a permanent account in this time, any properties from the temporary user should be transferred to the permanent user.
1 Like
You could add the user’s language to the User Table as you say. Then have a hidden Group of type user on each page and refer to Group User’s Language or in the Page Load Workflow you could set a Custom State on the page to equal User’s Language.
1 Like
You could also pass a URL parameter to the page and read it with the Get data from URL when you get to the page.
1 Like
Hi @patricia! Sorry to ask a basic question but how do you pass a URL pararmter to a page and read it with Get data from URL?
Thanks!
Hi @madeline.shuhui there is an action called Go to page. There is an option to pass parameters and to give the parameters a name and value. Later you check with Get data from URL. It works even if you are staying in the same page.
1 Like