Custom Language Selector
I am have two languages one is English and second is Arabic on web. I need to perform some task on changing language event from my custom control. I done it but unable to get the respective page url of the currently switched language or culture.
Let suppose I am at this url http://192.168.1.50:1377/other-links/quicklinksl1/mediacenter which is in English and now I clicked on language selector to get the page in Arabic language i-e URL http://192.168.1.50:1377/ar/other-links/quicklinksl1/mediacente-ABCSr. Please tell me how can I get this Arabic url of the page using code so that i can write the code in my custom language selector control.
You can try with the following code:
var currentNode = Telerik.Sitefinity.Web.SitefinitySiteMap.GetActualCurrentNode();
var culture = new System.Globalization.CultureInfo("name of the culture, it must be installed");
var url = currentNode.GetUrl(culture, false);
All the best,
the Telerik team