Available language statt current language … in der functions.php
function my_theme_setup() {
add_filter(‘wp_list_pages’, ‘new_nav_menu_items’);
add_filter(‘wp_nav_menu_items’, ‘new_nav_menu_items’);
}
add_action(‘after_setup_theme’, ‘my_theme_setup’);
function new_nav_menu_items($items){
if (function_exists(‘icl_get_languages’)){
$languages = icl_get_languages(‘skip_missing=0’);
if (count($languages) > 1){
foreach ($languages as $l) {
if (!$l[‘active’]) {
$items .= »
« ;
}
}
}
}
return $items;
}