Multilingual site: switching languages and staying on current page

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
10/18/2010 1:48:54 PM
Gravatar
Total Posts 22

Multilingual site: switching languages and staying on current page

Hi,

I'm developing a multilingual site and want to have a switch (button) that will allow the user to select a different language but stay on the "same" page, so for example if he's on http://www.myexample.com/mypage.aspx and click the button, he'll be redirected to http://www.myexample.com/lang/mypage.aspx (and vice-versa).

Now I tried using Request.Url but the URLs I get from this request is http://www.myexample.com/Default.aspx?pageID=12 , so event though my child site uses the same page names as the master site, I have no way of redirecting to the correct page.

Has anyone developed a functionality for this, or has a solution for me?

Keep in mind that I'm new to asp.net, I have way more experience with PHP.

10/18/2010 1:53:31 PM
Gravatar
Total Posts 18439

Re: Multilingual site: switching languages and staying on current page

Request.RawUrl will get you the relative url as seen in the browser rather than the real url that is serving the request which is what you are getting now with Request.Url

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.