Can I use custom states in a reusable header to enable language switch in the app?
I am creating a website in two languages. In the header element (reusable) I store a custom state called “language” with value “yes” or “no” with default “yes”. If the user klicks on the text “EN” placed in the header, the value “no” is set. On the other pages I set a condition to check the custom state and show the EN or DE text depending on the state. However, I loose the custom state value when I switch for example from index to product page (even though the value is stored on the reusable element on all pages). Can I make the custom state keep its value while switching pages? Or how could I fix this?
Thanks so much for your help.