Technical support This forum is closed.
Version 1.x > Technical support > MultiLingual Redirects to LanguageVersion HomePage? View modes: 
User avatar
Member
Member
michaelstrauss - 10/26/2006 3:18:26 PM
   
MultiLingual Redirects to LanguageVersion HomePage?
Is there a way to set up a multilingual site so that, if a user switches to another language version it doesn't automatically redirect them to the home page?

User avatar
Guest
admin - 10/31/2006 1:55:06 PM
   
Re: MultiLingual Redirects to LanguageVersion HomePage?
Yes, this is a standard feature of Kentico CMS 1.9 and 2.0.

User avatar
Member
Member
michaelstrauss - 10/31/2006 2:40:00 PM
   
Re: MultiLingual Redirects to LanguageVersion HomePage?
What is it that I am doing wrong then in setting up my drop down which changes the language culture?
Right now I have:

Public Sub ddRegionSelector_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddRegionSelector.SelectedIndexChanged
Me.Response.Redirect("?lang=" & Me.ddRegionSelector.SelectedValue)
End Sub

Is there a KB document in the DevGuide? I could not find one that referenced this specific problem.

User avatar
Guest
admin - 11/2/2006 10:19:32 PM
   
Re: MultiLingual Redirects to LanguageVersion HomePage?
Hi Michael,

the problem is caused by the fact that you're redirecting the user to an invalid URL. If you use Response.Redirect, you cannot use this kind of path. Instead, you need to write something like this:

Me.Response.Redirect(Request.RawUrl & "?lang=" & Me.ddRegionSelector.SelectedValue)

Regards,

User avatar
Member
Member
michaelstrauss - 11/2/2006 10:30:46 PM
   
Re: MultiLingual Redirects to LanguageVersion HomePage?
Excellent! That's it exactly.
Thanks Petr!