I think I should setup an httpmodule for this.. but I am not quite sure how to go about that with Umbraco.. so any help from those who did something like this will be a great help.. also is it possible to read Node values (or Node domain) from httpmodule initialize cuture event?
I am sure this is getting executed but when I print the culture of a page from the Page_Load event, its again back to en-US as per the settings from "Managed Hostnames" .. Can anyone please help me with this,,
Progra,atically change locale (language) of a node
I have two root nodes in my website.. one is set to English hostname and other is set to German..
I need to change the German node's language to English in certain conditions..Is this possible and how?
For example if some one comes to the german node using the URL
http://mywebsite.de?lang=en
I need to change the language of http://mywebsite.de to English..
Thanks,
Anz
Is there any help on this?
I think I should setup an httpmodule for this.. but I am not quite sure how to go about that with Umbraco.. so any help from those who did something like this will be a great help.. also is it possible to read Node values (or Node domain) from httpmodule initialize cuture event?
I have done the following in HTTPModule and registered it in the web.config
void context_PreRequestHandlerExecute(object sender, EventArgs e)
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-CH");
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("de-CH");
}
I am sure this is getting executed but when I print the culture of a page from the Page_Load event, its again back to en-US as per the settings from "Managed Hostnames" .. Can anyone please help me with this,,
Many Thanks,...
I have added the same question with better explanation here
http://stackoverflow.com/questions/8786339/programatically-change-locale-language-of-a-page
Please help :)
is working on a reply...