So your theme uses a custom library to generate the menu items, and that is responsible for adding the broken title attributes to the flags which are displayed as tooltips.
I dug into the code to identify where the issue is, and have produced a code snippet that you can add to your theme's functions.php file that resolves that problem.
/**
* Fix menu title attributes on language switcher
*/
add_filter( 'nav_menu_link_attributes', 'wpmlsupp_fix_title_attributes', 10, 2 );
function wpmlsupp_fix_title_attributes( $atts, $menu_item ){
if ( isset( $menu_item->object ) && $menu_item->object == 'wpml_ls_menu_item' ) {
$atts['title'] = "";
}
return $atts;
}
Note that nothing has changed in WPML for some time that would account for any changes with how this works. (I tested back to WPML 4.4.12 with your current theme version and got the same behaviour.) As such, this is very much custom work.
The pixelated flags are because you are displaying small graphics (18 x 12) at larger sizes (70 x 28).
You can fix that by either using larger graphics for the flags, or by using CSS to target the flag images and display them at their native size.
That's correct. WPML language switchers don't feature a tooltip.
It should be possible to modify the code above to add such a feature, but now we are into custom coding, and if you are not comfortable doing that yourself you should get a developer to do it for you.
Start by inspecting the $menu_item attribute, it may already include the language name, or at least the language code.
Hello, okay, but how is possible that before, it was displaying tooltip with language name correctly? So it was special feature of theme? Its kinda weird that wpml language switch doesnt allow to show tooltip with name - I thought wpml has this feature. Also I would like to ask - there is some problem withing WPML with displaying custom flags. If user want different and bigger flags than its in default, simply select flag upload feature dont wortk - flag is resized and not good quality. Only solution is to use custom flag upload and then overwrite flags in media/flags folder. Its weird that this is only solution. Why this has not been ever fixed? I think its serious flaw.
I don't know about the history of the site, but when I was testing the issue in this ticket I went back quite a lot of WPML versions, and the behaviour was the same, i.e. no tooltip from WPML itself.
The problem tooltip on your site was coming from the theme: if it used to be different, I expect it is changes in the theme (or libraries the theme depends upon) which have changed.
As for the custom language flags I tested this locally, and confirm that if you upload a custom flag then they are automatically resized to 18 x 12 px, and this is hard-coded into the plugin without the possibility to change the resulting image file size.
I can see that this was discussed internally 3 years ago and it was decided not to change this, as there didn't seem to be much demand.
The workaround is simple enough, but I think this is what you are already doing.
When you upload a custom flag image it is saved in wp-content/uploads/flags/ and you can simply overwrite the flag image found there with one with the same name and the desired larger dimensions.
I'm sorry that there isn't a solution within the normal UI available.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.