Fix Flipping to different page when changing the language

When I change the language the tool anvigates away from the home page and open another page on my website

1 Like

Hi there, @backhome84 :wave:

I’ve checked one of the pages where your Website Translator widget is installed and everything seems to be working correctly.

When you choose the language, the lang attribute is added to the page URL and the content of the page gets translated:

image


However, I see that when the page gets translated, this popup appears. And if you close it, it actually redirects you to another page:


If this is what you meant, the popup redirecting you to another page, appears after translation because of the cookie used on your website. Here is this cookie: PHPSESSID

If you don’t want the popup to appear after translation, you just need to delete this cookie.

However, if I misunderstood your case, please describe it in more detail :slightly_smiling_face:

Go to the main page on my website.
Change the translator language from English to Arabic. You will see that the main page will change to a different a different page.

That is what I mean, this behaviour should not happen

1 Like

Got it, thanks!

This issue is caused by your website’s routing. If you add any parameter to the website’s URL (for example, https://www.home-nader.com/index.php?test=abc), you get redirected to the page with the map and search.

With the way our widget works, it also adds the parameter (lang) to the website URL and translation occurs.

Thus, to fix this issue, you should change the routing settings on your website.

Let me know if this explains things or if you have any other questions :slightly_smiling_face: