Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Common url for all languages



I'm currently involved in a project where that requires the url for all languages to stay the same, e.g. the language segmen (for instance /en/) cannot be a part of the url. I've changed the order of language selection so that the epslanguage-cookie is prioritized before anything else. But still the url is updated to reflect the current language.

Is there any way to avoid this?

Regards, Bjørn Terje Svennes

May 31, 2021 10:25


You can also map the languange i episerverframework.config for a specific domain/url. Look at the mappings section and add language="en" for you default adress. This will ensure that you language is mapped to one specific adress you can also add other for instance map the .se domain to swedisdh and the .com to English

You can refer below thread for more info-

May 31, 2021 10:38

We only have one domain that should handle all languages. There is an option on the page for changing it.

May 31, 2021 10:39

I think it's possible:

  1. Remove the default episerver content route. By default, content routing is registered with a pattern of {language}/{node}/{partial}/{action} with partial and action parameters being optional.
  2. Create your own route: /{node}/{partial}/{action} and create a route resolver using the cookie instead of the /language/ in the url. Make sure to cover the scenario where there is no cookie.

Hope it helps !

May 31, 2021 11:51

Thank you, Guiliano. I will try to go down that path. There is a lot of "magic" happening within the DefaultContentRoute. Guess I still have to use the MapContentRoute-extension, but add my handling as a parameter.

May 31, 2021 12:22

I've been trying to implement my own routing resolver (as suggested by Guiliano), but I believe that to make things work I need to use the MapContentRoute-extension. This extensions accepts a MapContentRouteParameters-param and this is where I should add my custom routing. The problem is that I'm having a hard time finding the class that actually routes the language. Any ideas?

Jun 01, 2021 7:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.