WPML customize menu
By: Unknown on Tuesday, 24 February 2015 | 16:23
<ul class="lang-switcher">
<?php
$languages = icl_get_languages('skip_missing=N&orderby=KEY&order=DIR&link_empty_to=str');
foreach($languages as $language){
$flag = $language['country_flag_url'];
$url = $language['url'];
$isActive = $language['active'];
$name = $language['language_code']
?>
<li><a href="<?php echo $url; ?>" <?php if($isActive == 1){ ?> class="active" <?php } ?>>
<?php echo $name; ?>
</a></li>
<?php } ?>
</ul>