Forum Replies Created

Viewing 1 replies (of 1 total)
  • Summary work for me:
    Add the code follow in header.php of your theme:

    <?php
    // for multilanguage change flag
    if ( function_exists( 'ps_012_multilingual_list' ) )
    {
    	$gs = ps_012_multilingual_list(false);
    }
    foreach(array_reverse($gs, true) as $key=>$val){
    		$flags_dir = get_bloginfo('template_directory');
    		$flags_dir .= '/images/flags/';
    		$flag_icon = $flags_dir . $key . '.png';
    		if ( ps_url_exists( $flag_icon )):
    			if ($val['current']) {
    				$flag_icon = '<img src="'.$flag_icon.'" style="float:right;margin:2px;border:1px solid #021a40;background-color:#ff0>"';
    			}
    			else
    			{
    				$flag_icon = '<img src="'.$flag_icon.'" style="float:right;margin:2px">';
    			}
    		endif;
    		$html .= '<a href="'.$val['url'].'">'.$flag_icon.'</a>&nbsp';
    	}
    
    	echo $html;
    
    ?>

    Copy folder at: wordpress\wp-content\plugins12-ps-multi-languages\flags to wp-content\themes\yourtheme\images

Viewing 1 replies (of 1 total)