Orchard on multiple domains (.nl, .de, .be, etc)

Topics: Localization
Aug 3, 2011 at 7:40 AM

I'm developing a multilingual website that will be accessible via multiple domains. So when someone goes to domain.nl/contact they get the dutch version, and domain.de/contact gets the german version. Both will be managable via the same Orchard installation on the same server.
The problem is that both these contentitems would have the url "/contact" in orchard, and that's not possible. So I'm looking for a solution to this problem, and maybe someone can help me out.

The only possibility I see at the moment is to prefix all url's with their language (so /nl-NL/contact and /de-DE/contact). This way the url's will be unique for orchard.
And then, when a request enters, I append the language to the beginning of the url (so domain.nl/contact becomes domain.nl/nl-NL/contact) before it enters orchard. At least, I hope that's possible :)

Do you have any other ideas to fix this problem?

Coordinator
Aug 3, 2011 at 11:38 PM

Well, one possibility could be to manipulate things at the route level, but that would probably necessitate some heavy lifting.

Developer
Aug 4, 2011 at 9:08 AM

A solution would be to enable MultiTenancy and to create one tenant per culture (keeping the default site with default culture).

You configure one tenant for each domain and in the Settings of a tenant, you set the correct culture.

You can use the same database (using a Prefix when you configure the tenant) or separate one database by domain.

You can have the same Theme or select one by domain. 

It's bit more complicated to administrate because you have to explicitly enable the modules on each tenant and to repeat the same configuration you already set in the default site (widgets, users, ...).

You also have to switch between the admin but this way, you have more control on your domains and contents by culture.

 

An annoying problem is that the admin of a tenant is translated in the language that you set in configuration.

That's why I made this suggestion in Culture Picker Module discussions: http://orchardculturepicker.codeplex.com/discussions/266705 : Allow to specify the culture used in Admin

Aug 22, 2011 at 6:56 AM

Thanks agriffard! MultiTenancy is probably a better solution than the localization plugin. I'll have to dig a little deeper because it would be really nice for translators to be able to translate one article to different languages. With multitenancy than can be a pain, but maybe the import/export module can help me out there.

Sep 14, 2011 at 6:33 AM

i have to do exactly the same thing but i can't do this with multitenancy because i have to use the same data for each language. Is there already an solution found for this problem? it's really important for me!

Coordinator
Sep 14, 2011 at 6:35 AM

Modify the multi-tenancy module to allow for shared contents, contribute fixed version. win!

Sep 14, 2011 at 6:59 AM
Edited Sep 14, 2011 at 7:02 AM

hmm i understand your response but i don't think that's the way to go when i read the following thread: http://orchard.codeplex.com/discussions/238703

bertrandleroy: The problem is that this is not what the multi-tenancy module was designed for. Multi-tenancy as it was designed will simply not allow you to share data between tenants unless you completely handle that through your own code. You may choose to re-implement your own version of multi-tenancy, implement custom data services for shared data, or implement the system as a blog-like module. I don't see any of those options as fast.
Unfortunatly i do not have the knowledge (maybe in a few weeks) to write such a module. But i do think this feature is very important for the Orchard cms. It is possible to write data services but it is very time consuming and not very efficient. Btw don't take me wrong, i'm very exited by Orchard CMS and the support i get by this forum and the people.
Coordinator
Sep 14, 2011 at 7:04 AM

I'm sorry.