Search code examples
asp.netinternationalizationglobalizationcultureumbraco7

Website configuration to have different culture settings per subdirectory


I have an Umbraco site with this structure

En -Home -Page1 Es -Home -Page1 It -Home -Page1

etc

And I want when you browse to www.mydomain.com/en/home.aspx to have the culture and culture-ui set to en or en-GB www.mydomain.com/it/home.aspx to have the culture set to it or it-IT etc

I am not sure how to set up my web config so that each subdirectory would have a different globalisation setting.

From the globalisation settings I can change the culture of the entire application but I want my culture to be set per directory.

I tried setting the hostnames and that partly works but it affects the URLs and I want the same hostname to apply to multiple cultures per subdirectory

Any idea if that's possible?


Solution

  • With umbraco there is no need to add a web.config for setting the culture, and I am assuming your folders are really just virtual pages in the umbraco content section.

    With Umbraco 7 you can now set a domain and a different culture for subfolders.

    The "fake hostname" works fine in version 6 and lower, but the umbracohq solved this in version 7 so do not do this in version 7.

    You can set a host name at the toplevel, and add a culture on each node in the Content section. It is one of the options of each node if you have admin rights to the content section.