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.

This topic contains 6 replies, has 2 voices.

Last updated by pharaweeB 4 years, 8 months ago.

Assigned support staff: Bruno.

Author Posts
November 12, 2014 at 6:14 pm #510438

pharaweeB

Dear Support
Could you please kindly help, I have a problem with WMPL plugin please see below :

1. My site (hidden link) have 4 languages : English, Thai, Chinese, Arabic. I have tried to select the option setting on WMPL plugin but I can not make a drop down language menu on the top menu bar navigation. Right now, they show all 4 languages.

Please see my site login detail below:
URL: hidden link
username:
password:

My contact email: pharawee@yahoo.com

Regards, Pharawee

November 12, 2014 at 6:24 pm #510446

pharaweeB

How can I send my sit login information to you ? Please provide me you email that I could send it to you.

Regards,
Pharawee

November 12, 2014 at 11:19 pm #510550

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Are you using any custom function to add this menu or you are using the native function of WPML?

Also, what is the version of WPML and WP are you using? I'll ask the debug information so I can verify your installation.

Thank you.

November 13, 2014 at 3:58 am #510602

pharaweeB

Regarding to your question:

1. Are you using any custom function to add this menu or you are using the native function of WPML?
= No

2. Also, what is the version of WPML and WP are you using? I'll ask the debug information so I can verify your installation.
= I just install WPML Version 3.1.8.2 and WordPress ver 4.0

I already submit the debug information, please kidly help I am very appreciated for your great support.

Thank you,
Pharawee

November 13, 2014 at 6:43 pm #511150

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I'll ask for some information so I can verify the problem. The fields for you to insert the credentials will be below its comment field.

Please let me know exactly what steps should I follow to see the problem.

Note: Please make a full backup of your site.

Thank you.

November 14, 2014 at 10:35 pm #511835

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I fixed your site. Please, could you check if this is working as intended?

Was necessary to reduce the padding of the menu for this to work properly. I added this line in WPML > Languages > Additional CSS:

#main-menu > ul.menu > li > a { padding: 12px 7px 15px !important; }

I added this function in functions.php file of your theme:

/* WPML Menu Fix */
add_filter( 'wp_nav_menu_items', 'wpml_custom_language_switcher', 10, 2 );
function wpml_custom_language_switcher( $items, $args ) {

	$languages = icl_get_languages( 'skip_missing=0&orderby=code' );

	if( !empty( $languages ) ) {
		
		$sub_menu = $menu = '';
		foreach( $languages as $lang ) {
			if( ! $lang['active'] ) {
				$sub_menu .= '<li class="current_lang-'.$lang['language_code'].'"><a href="'.$lang['url'].'">'.$lang['native_name'].'</a></li>';
			}
		}

		foreach( $languages as $lang ) {
			if( $lang['active'] ) {
				$items .= '<li class="current_lang-'.$lang['language_code'].' menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-depth-0 menu-item-simple-parent "><a href="'.$lang['url'].'">'.$lang['native_name'].'</a><span class="arrow"></span> <ul class="sub-menu">'.$sub_menu.'</ul></li>';
			}
		}
	}

	return $items;
}

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

November 15, 2014 at 3:05 am #511867

pharaweeB

Dear Bruno,

It's working, I am very appreciated for your kindly support and thank you very much again.

Pharawee