Multi-domain multi-language Orchard site

Topics: Customizing Orchard, Localization
Sep 3, 2012 at 10:38 PM

Hello all,

I would like to setup a multi-language site where each language would have its own domain name while each page would have the same path in each language, e.g.:   - is an en-US version of the About page      - is a ru-RU version of the About page 

For some reasons it is not desirable for me to use multi-tenancy to implement this scenario. So I am looking for doing it with the help of Orchard content localization.

I have implemented a culture switcher that is based on domain name, and it works just fine. But content localizations cannot have the same permalink because Orchard requires them to be unique.

It is probably possible to patch Orchard to allow non-unique slugs within localizations of a content item. But would it cause problems in future or undesirable side effects?

If not, would it be acceptable to offer such a patch for inclusion into Orchard code? (this feature might be useful for someone else and it would save me trouble of merging the patch during version upgrades ))


Sep 12, 2012 at 10:28 PM

Maybe some clever URL rewrite rules are in order?

Oct 24, 2012 at 6:10 AM

Still have not solved the problem. Maybe URL rewriting could help, but I don't quite understand how to apply it here. Any hint on this would be appreciated.

So far I have managed to suppress Orchard's complain about non-unique path for localized version of content item. And it works fine from the navigation point of view. Also, widgets on a page work correctly and use the right localized version of content according to current language.

But main content item seems to retrieve an arbitrary localized version of content (the first one matching the path, and they are probably returned in no specific order from DB). What I need to do is to hook into the mechanizm that translates path into Content Item id and make sure it takes into consideration current language.

Could anyone direct me to the source files in Orchard where this translation happens? 

Thank you in advance.


Oct 24, 2012 at 7:02 AM

I might be wrong, bu the routing feature of orchard is primarily designed for urls, it has nothing to do with domain. Of course you can try to extend it, but did you try the idea offered by Bertrand? For instance, IIS URL Rewrite is able not only make a redirect but also replace the link in generated page, in other words it can be integrated absolutely seamless and transparent.

Oct 24, 2012 at 7:47 AM

What we do is built a system where the current culture (language) is extracted from the url.

See for example or

Using the Contrib.RewriteRules we could (for example) do internal redirects from to