Support » Plugin: Multisite Language Switcher » Flag Positioning

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

    (@realloc)

    Thank you. There are a some possibilities. Would you like to describe what you want to do?

    Cheers,
    Dennis.

    Yes! The thing is I have 4 flags icons above the navigation menu. Sorry I can´t attach any link.

    The order as displayed is German, English, Spanish and French. Though the order I need is Spanish, English, French and German.

    I can´t get to change them.

    Thanks

    Plugin Author Dennis Ploetner

    (@realloc)

    In the current version you can sort by description and by language-code. Do you have problems to add some lines of code? I could give you an example.

    Not a sigle problem on adding lines of codes, shed light on the subjet, I beg you! 🙂

    Thanks again

    Plugin Author Dennis Ploetner

    (@realloc)

    OK, just begin with the the setup of MSLS in your blogs. Set order by description and change the description to something like “1 – Spanish”, “2 – English”, “3 – French” and “4 – German”.

    For not showing these numbers in the title you could some code in your functions.php

    /**
     * Let's filter the first 4 chars of the description in
     * the generated links
     */
    function my_msls_output_get( $url, $link, $current ) {
    	return sprintf(
    		'<a href="%s" title="%s"%s>%s</a>',
    		$url,
    		substr( $link->txt, 4 ),
    		( $current ? ' class="current"' : '' ),
    		$link
    	);
    }
    add_filter( 'msls_output_get', 'my_msls_output_get', 10, 3 );
    
    /**
     * Let's cosutomize the icon-output
     */
    class MyMslsLink extends MslsLink {
    	protected $format_string = '<img src="{src}" alt=""/>';
    }
    
    /**
     * Le'ts use the above class
     */
    function my_msls_link_create( $display ) {
    	return new MyMslsLink;
    }
    add_filter( 'msls_link_create', 'my_msls_link_create' );

    Read on here: https://github.com/lloc/Multisite-Language-Switcher/wiki/Change-the-output

    Great, It did Work perfectly.

    Congrats for that support and usefull tips.

    Thanks!

    Plugin Author Dennis Ploetner

    (@realloc)

    OK, very good.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Flag Positioning’ is closed to new replies.