Support » Plugin: Multisite Language Switcher » Language display in a drop-down menu, and in the header.

  • Resolved ngoran.ahoua


    My question is how to display in the header of my template, a drop-down menu of languages ​​(I have 9 different languages).
    I did go to this page “” as you indicated in this ticket “ support / topic / flag-display-customization? replies = 2 “but I do not exactly know what code I should use? When I test with
      if (function_exists (‘the_msls’)) the_msls ();
    I have the choice of languages ​​is displayed but how to display the language list in a drop-down, with the current language as the selected item?(which codes should I use?)? Thank you for your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Dennis Ploetner


    OK … it’s not that hard. 😉

    Insert some code – for example like this –

    <select id="msls_languages">
    <?php if (function_exists ('the_msls')) the_msls (); ?>

    in your header where you would like to have the drop-down. In your functions.php insert a function like this

    function my_msls_output_get( $url, $link, $current ) {
        return sprintf(
            '<option value="%s"%s>%s</option>',
            ( $current ? ' selected="selected"' : '' ),
    add_filter( 'msls_output_get', 'my_msls_output_get', 10, 3 );

    Hope this helps.


    Thank you for your help, the solution works very well. but I do not have flags that appear 🙁 is it possible to display ” name + flag” in this drop-down menu?

    Plugin Author Dennis Ploetner


    An image in an option? I’m quite sure that this will not work in all browsers.

    I think you could accomplish this much easier if you would set the output-options of the plugin (please read and then try to format the generated <ul> and the <li>s by this line of code

    <?php if (function_exists ('the_msls')) the_msls (); ?>

    with CSS.

    Again thank you for your help! I will try to implement this solution.
    However I have a problem with the drop down menu: Links do not work. I can not switch between versions. I was able to do so as I do not utlisais menu. You know why?

    below a link :


    Plugin Author Dennis Ploetner


    Thanks for the link (BTW: There are images in the generated code of the drop-down. Please have a look at the html-code!).

    Yes, a drop-down like this does nothing. You could make use of a little bit of JavaScript. Maybe something like that:

    Ok,Thank you for your availability and your help!


    Great plugin you made, really helpful. But i dont manage to get it into the topbar. Ive already copied the <?php if (function_exists ('the_msls')) the_msls (); ?> text in the header.php and it is now displaying but id to doesnt have any links, the links are not working.

    Again: thanks a lot

    Plugin Author Dennis Ploetner


    Do you have a link where I can see this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Language display in a drop-down menu, and in the header.’ is closed to new replies.