This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Please make sure to update to WPML to the latest and check our list of Known Issues before reporting

This topic contains 2 replies, has 2 voices.

Last updated by David 7 years, 6 months ago.

Assigned support staff: Harshad.

Author Posts
October 1, 2012 at 10:31 pm #77827

David

Hi,

I just want to show the original dropdown language selector (<?php do_action('icl_language_selector'); ?>) - but without text, only with flags. How can I do that?

October 2, 2012 at 5:12 am #77832

Harshad

Dear David,

Please add the following code into your theme's functions.php file, it will filter the language switcher to display only flags.

add_filter('icl_ls_languages', 'wpml_ls_filter');
function wpml_ls_filter($languages) {
	global $sitepress;
		foreach($languages as $lang_code => $language){
				 $languages[$lang_code]['native_name'] = '';
				 $languages[$lang_code]['translated_name'] = '';
			}
	return $languages;
}
October 2, 2012 at 11:15 am #77928

David

Thank you!

The topic ‘[Closed] Only flags in dropdown language selector’ is closed to new replies.