WPML.org网站插入仅带标志的语言选择器(水平)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WPML.org网站插入仅带标志的语言选择器(水平)相关的知识,希望对你有一定的参考价值。
Of course the Plugin from wpml.org has to be installed, the file "wpml-integration.php" from docs/theme-integration has to be copied into your theme-directory and the call include "wpml-integration.php"; has to be copied to your functions.php. After that, you can simply place
// Languages links to display in the header // function wpml_languages_list_notext($skip_missing=0, $div_id = "langselector"){ echo '<div id="'.$div_id.'"><ul>'; foreach($languages as $l){ echo '<li>'; if(!$l['active']) echo '<a href="'.$l['url'].'">'; echo '<img src="'.$l['country_flag_url'].'" alt="'.$l['language_code'].'" />'; if(!$l['active']) echo '</a>'; //if(!$l['active']) echo '<a href="'.$l['url'].'">'; // echo $l['native_name']; //if(!$l['active']) echo ' ('.$l['translated_name'].')'; //if(!$l['active']) echo '</a>'; echo '</li>'; } echo '</ul></div>'; } } }
以上是关于WPML.org网站插入仅带标志的语言选择器(水平)的主要内容,如果未能解决你的问题,请参考以下文章
css 仅带CSS的样式选择框示例。这里的实例:http://www.mychildrensboutique.co.uk/