Routers Conflicts?[Solved]

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

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.

Thanks:)
I need the router also for redirecting to a special page in case the content doesn’t exist. I’m trying to take advantage, and use the router for different pages, because of the RTL & LTR in those pages, since it’s not onlt font issue. all desigm is opposite.
Would like to understand the system from this point.
Dafna

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.

It’s important to me to understand everything before I change the code.

so I assume you need someone from Wix team :slight_smile:

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

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 :sparkles::sparkles::sparkles:

thanks for info