Developer forum

Forum » CMS - Standard features » Changing language in fronend

Changing language in fronend

Aki Ruuskanen
Reply

Hi,

I have a website with two languages. 

Is it possbile to change language in frontend and stay on the current page.

Example:

Im am here:  www.domain.se/om/kontakta.aspx

When I change language I wanna end up here: www.domain.se/about/contact.aspx

 

Regards / Aki

 

 


Replies

 
Morten Bengtson
Reply

I'm assuming that you have multiple language versions set up in Websites.

Try to add this to your layout template...

<!--@LoopStart(Languages)-->
<ul>
<!--@If Defined(PageID)-->
<li><a href="Default.aspx?ID=<!--@PageID-->" hreflang="<!--@Culture-->" rel="alternate"><!--@Name--></a></li>
<!--@EndIf(PageID)-->
</ul>
<!--@LoopEnd(Languages)-->

You will not stay on the same page, but you will be transferred to another language version of the current page.

 

You must be logged in to post in the forum