Hi Friends,
I created a router, for mltilingual site, with RTL & LTR data.
Each language has it's own dynamic page, based on same 'collections' collection.
Upon changing the language, the code checks relevant data in selected language. if there is data, a function returns a link I build, same as the relevant dynamic page field, adding a /language suffix. For example, the created link looks like that: https://drorgoldbaum.wixsite.com/akevotcollections/en/collections/eng/ikrit-biran.
Until here, all good. The problem is that the page uploads in loops.
I wonder if I create a conflict between Wix routers for multilingual or dynamic pages, and my router.
Will appriciate any idea, any lesson, anything.
This site is based on this router.
Thanks a lot,
Dafna
thanks for info
I think that I can't winn the Multilingual router, but I found a solution:
- Removed the Multilingual.
- Wrote the language menu by code, & saved it in a session variable.
Router working now ✨✨✨
Hello @Dafna Kotzer That an interesting use case. If I were you I would use a router page rather than a dynamic page. Router are meant for that use case (1 URL dispatching to different pages) Regarding you current situation, You probably have a loophole in your logic that trigger the redirecting in a loop. My advise is first create a static redirect so that you can test that your logic redirect to the correct page as expected. Once your static redirect works, you can modify your code and make it dynamic. It would help, if you share your logic
As far as I understand you want to have a multi language site where some of the pages exist in both languages and some are not. For a page that exists only in one language you want to display the same page for all languages, right? Seems to me that you are using both Wix multi-language with your router logic of multilanguage which probably causes the issue. I would disable the wix multilanguage and see whether it resolve the issue first.
Not familiar yet with the multi language options in Wix but do you really needs different page for each language, if not, I would just use the same page and display different content using the query params in the URL without using the router.