Viewing 1 replies (of 1 total)
  • Plugin Author rufein

    (@rufein)

    Hi,

    You can add flags with the original switcher in mq translate plugin.

    I developed this module because the structure of the widget was rigid. There was no filter to alter then content in the selector. So, i’ve added a filter if you want to alter it. For example, to add a flag you can do the following code:

    add_filter( 'lang-code-selector-content', 'test_lang_code_selector_content' ); 
    
    function test_lang_code_selector_content( $lang_code ){
    	global $q_config;
    	$link_flag_url =  dirname(plugins_url()) . '/' . $q_config['flag_location'] . $q_config['flag'][$lang_code];
        $link_flag = "<img widht=\"18\" height=\"12\" src=\"$link_flag_url\" alt=\"$lang_code\" />";
        return $lang_code . $link_flag ;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Load MTranslate Flags instead of text’ is closed to new replies.