Multitenant - Default Culture by Tenant!

Topics: Localization, Writing modules
Apr 12, 2013 at 8:50 PM
Edited Apr 12, 2013 at 8:54 PM
Hi to everyone,

It is possible to get and set the culture by tenant?

Does anyone knows where is the tenant culture info stored? When i am using the httpContext to get the current site, it has always the information of the Default site.

I am developing a multitenant site where Colombia has as default culture es-CO, República Dominicana es-CO, and United States en-US.

When i go to CurrentSite.SiteCulture, it is like if it was not built for multiple tenants, because it has the same default culture for all the tenants.

I need to get/set the default culture depending on the different tenant.


Thnx a lot!
Developer
Apr 12, 2013 at 11:35 PM
You should be able to set the culture per tenant via Settings (accessible from the admin menu on the left).
Apr 15, 2013 at 4:58 PM
Edited Apr 15, 2013 at 4:59 PM
Hi skywalker,

You are right. But for those who are making multitenant sites with multiple languages in each tenant.., you have to explicit add the languages to each tenant and also set the default language in each tenant. You can't assume that en-US is the default just because it was created bydefault when the tenant instance was created. If you don't do that explicit, the tenant will get the info of the current site from the Default site, and i think we don't want that! Anyway i am also a little confused about how Orchard is handling the settings on the default site and tenant sites. Sometimes i get from workcontext object undesirable information, but i think i will make a new thread for that specific issue.

Thx!
Developer
Apr 15, 2013 at 5:40 PM
I'm not sure I understand the issue, but it sounds like you're unblocked.
Yes, if you think you're seeing strange behavior with getting information from the work context, please create a new thread and we'll go from there.