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

Forums / Developing with Sitefinity / Change Language Selector with jQuery

Change Language Selector with jQuery

2 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    19 Jul 2013
    Link to this post
    I want:         E | F | I

    to be shown instead of:    English  française italian

    I use this bit of jQuery to get pretty close.

    The problem with this is that I get a  |  divider on the last Language Item as well.

    Any of you jQuery experts can help me with that?

    jQuery('.sflanguageLnk').each(function(){
       var ShortText1 = jQuery(this).text().slice(0,1) + " | ";
      jQuery(this).text(ShortText1) ;
       })
      
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    19 Jul 2013 in reply to Markus
    Link to this post
    Got it working.

    Well as soon as one post the idea pops up :-)

    var ShortText1 = jQuery(this).text().slice(0,1) + " | ";
    jQuery(this).text(ShortText1) ;
    })
    jQuery('.sflanguagesHorizontalList li:last-child a').each(function(){
    var ShortText2 = jQuery(this).text().slice(0,-2);
    jQuery(this).text(ShortText2) ;
    })

    It would be a nice feature if we could set the text and/or language to be displayed in the language selector under Admin - Setting - Languages along with the seperator.

    Markus
2 posts, 0 answered