Languageswitcher with links and interactions

Hi everyone,
I am currently working on a language switch in a pop-up. Three links (block element with image and text) should be available for choosing the language. When clicking on the element, I save a the language-code in the LocalStorage via the interaction in order to automatically point to the chosen language when visiting the page later. The pop-up is then closed via a second interaction.

One step is still missing. The forwarding to the corresponding language. At first I thought I could simply assign a link to the block. But this link is not called because the interactions. With the interactions, however, I cannot set a link to another page.

Does anyone have any ideas?

Hi, I have a similar problem. Did you find a solution for the link?

Hi Simone,
I ended up solving this without the popup. In my case there are icons with the country flags in the navigation.
These are made of a div that is configured as a link and points to the language. This div needs a unique id or class. The image is then inside the div.

<a id="brxe-dbexgs" href="/en/" class="brxe-div switch-to-en">
<img src="Flag_of_Europe.svg" class="brxe-image css-filter size-full" alt="Flag of Europe" decoding="async" id="brxe-blbchz" data-type="string">
</a>

With a javascript (onclick-event) I write a value (language) to the local storage when the div is clicked.

localStorage.setItem('userLang', "en");
1 Like

Thank you very much for your quick reply!