Hi,
Please paste this code at functions.php of child theme.
// Filter wp_nav_menu() to add additional links and other output
function wpml_custom_menu($items,$args) {
if (function_exists('icl_get_languages') && $args->theme_location == "primary" ) {
$languages = icl_get_languages('skip_missing=0&orderby=name');
$current_language = $languages[ICL_LANGUAGE_CODE];
$items .= '<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children mega-with-sub ss-nav-menu-item-4 ss-nav-menu-item-depth-0 ss-nav-menu-reg um-flyout-align-center"><a href="' .$current_language['url']. '"><img src="' . $current_language['country_flag_url'] . '" /> ' .$current_language['native_name'] . '</a><ul class="sub-menu sub-menu-1">';
unset( $languages[ICL_LANGUAGE_CODE] );
foreach( (array)$languages as $language ) {
$items .= '<li class="menu-item menu-item-type-post_type menu-item-object-page ss-nav-menu-item-depth-2"><a href="' . $language['url'] . '"><img src="' . $language['country_flag_url'] . '" /> ' . $language['native_name'] . '</a></li>';
}
$items .= '</ul></li>';
}
return $items;
}
add_filter( 'wp_nav_menu_items', 'wpml_custom_menu',10,2 );
Thanks
Mohammad