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

Forums / Developing with Sitefinity / Language Selector

Language Selector

5 posts, 0 answered
  1. Cyril Wasem
    Cyril Wasem avatar
    20 posts
    Registered:
    04 Aug 2009
    24 Sep 2009
    Link to this post
    Hi,
    is it possible to have Hyperlink instead of DropDown?
    Have you à control to do that ?
    Cyril
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    24 Sep 2009
    Link to this post
    Hi Cyril Wasem,

    Thank you for using our services.

    We have a similar customization of the language selector. The one that I am attaching renders available languages as flag links. Please take a look at it and modify it to fit your needs.

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Cyril Wasem
    Cyril Wasem avatar
    20 posts
    Registered:
    04 Aug 2009
    25 Sep 2009
    Link to this post
    hi,
    fine
    thk's
  4. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    18 Feb 2010
    Link to this post
    Hi Radoslav,

    I have one trouble using language selector. After adding in my page if you use is perfect but if the page has a PostBack you lost the new Template and comeback to default dropdown. I have seen if exist some limiting during post backs but nothing, always seem correct. Could you see plz.

    regard Romi.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    19 Feb 2010
    Link to this post
    Hi Pierre,

    You could use this code instead

    <style type="text/css">   
    .langList li   
    {   
        float:left;   
        padding: 0px;   
        list-style-type:none;  
             
    }  
         
    </style
     
     
    <lng:LanguageBar  ID="list1" runat="server"
        <LayoutTemplate
            <lng:LanguageList CssClass="langList" ID="languageList" runat="server"></lng:LanguageList
        </LayoutTemplate
    </lng:LanguageBar>

    or modify the LanguageFlagList as shown below. There is a problem with the way that the template is instantiated

    protected void Page_Load(object sender, EventArgs e)
        {
             
            this.flagList.LayoutTemplate = this.Template;
        }
      
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.flagList.LayoutTemplate = this.Template;
        }
      
        private class DefaultTemplate : ITemplate
        {
            public void InstantiateIn(Control container)
            {
                LanguageFlagList list = new LanguageFlagList();
                list.ID = "languageList";
                list.CssClass = "langList";
                container.Controls.Add(list);
            }
        }
      
        private ITemplate Template
        {
            get
            {
                    return new DefaultTemplate();
            }
        }


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
5 posts, 0 answered