Topic Tags: Language Switcher


If you are using WPML 4.3.0, 4.3.1, 4.3.2 or 4.3.3 when you use a language switcher with an image for a flag, you might have a missing ALT tag for the image.


Go to the ../wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/ directory and edit the class-wpml-ls-model-build.php file.

In it, change the following code from:

		            $ret[ $code ]['flag_alt']   = ( $display_name || $display_native ) ? '' : $data['translated_name'];


		            $ret[ $code ]['flag_alt']   = ( $display_name || $display_native ) ? $data['native_name'] : $data['translated_name'];

Leave a Reply

Please leave here comments about this page only.
For technical support and feature suggestions, head to our forum. We are waiting there!

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>