More in this section

Forums / Bugs & Issues / Custom Language Selector

Custom Language Selector

2 posts, 0 answered
  1. waqar
    waqar avatar
    76 posts
    28 Mar 2011
    26 Aug 2011
    Link to this post

    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 which is in English and now I clicked on language selector to get the page in Arabic language i-e URL 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.

  2. Pavel Iliev
    Pavel Iliev avatar
    140 posts
    18 Jul 2016
    02 Sep 2011
    Link to this post
    Hi Waqar,

    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

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

2 posts, 0 answered