1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Custom Language Selector

Custom Language Selector

6 posts, 0 answered
  1. waqar
    waqar avatar
    76 posts
    Registered:
    28 Mar 2011
    16 Sep 2011
    Link to this post
    HI everybody!

    Can you please see the attached image for the complete understanding of the required functionality. I did hard work to design this scenario because I have already asked this question on the forum but did not get satisfactory and correct answer.

    Please also specify when and how to change the culture as well.

    Also suppose I want this on a button click event.

    Many Many Thanks In Advance!
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    22 Sep 2011
    Link to this post
    Hi Waqar,

    I reviewed your diagram but it is somehow confusing - under Nen (in English) you have a page in Arabic and under Nar (in Arabic) you have an English page. This is not quite possible or I don't understand your idea? Also, do you need a walkthrough on how to go back 2 pages in the hierarchy (you could use the Parent property of PageNode). Please give us more details.

    Regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. waqar
    waqar avatar
    76 posts
    Registered:
    28 Mar 2011
    22 Sep 2011
    Link to this post
    Thanks for the reply.

    You are right I made a mistake in the diagram. Can you please see 2nd attached diagram.

    Please reply ASAP.


    Thanks
  4. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    22 Sep 2011
    Link to this post
    Hello Waqar,

    Well I'm not sure how exactly you try to retrieve the AR page but if you know the UrlName of the Nar page you could use this code to retrieve it:

    var pageManager = PageManager.GetManager();
    var page = pageManager.GetPageNodes().Where(p => p.UrlName == "Nar").FirstOrDefault();

    Then you can retrieve a list of subpages of the Nar page with

    var subPages = pageManager.GetPageNodes().Where(p => p.ParentId == page.Id);

    and by cycling through then get to the "A" page.

    Regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. waqar
    waqar avatar
    76 posts
    Registered:
    28 Mar 2011
    23 Sep 2011
    Link to this post
    Thanks for the reply,

    I think the diagram is misleading you, So lets start with the simple question can you please provide the code for my custom language selector? Which should have same functionality as sitefinity language selector.
  6. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    26 Sep 2011
    Link to this post
    Hello Waqar,

    We do not have a ready code for custom language selectors - please check these forum threads - they might be useful for you:

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/custom-language-selector.aspx

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/language-selector-and-url-rewriting.aspx

    Regards,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
6 posts, 0 answered