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 thread is resolved. Here is a description of the problem and solution.

Problem: Issues with the drop-down language switcher.

Solution: There is some incompatibility between the WPML Drop Down language switcher and the theme CSS in the menu. To solve, it is needed to add a custom language selector. Please see the documentation below to learn how to customize the language switcher.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/

This topic contains 7 replies, has 2 voices.

Last updated by gregorK-3 2 years, 10 months ago.

Assigned support staff: Vincenzo.

Author Posts
August 8, 2016 at 7:53 am #993633

gregorK-3

Hi guys

At our site photomakerapp.com I'm trying to get a dropdown menu of languages but without luck.

I tried to disable all plugins except WPML - no luck
I tried with the code added to functions.php found in other thread - no luck. It just give another nondropdown menu

Any idea what else could be wrong? Attached screenshot shown original dropdown on the left and dropdown added by functions.php on the right. None of them is real dropdown 🙂

Thank you

G

August 8, 2016 at 1:35 pm #994440

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello, thank you for contacting WPML Support!
I will take care of your ticket.

This may be related to the theme's CSS code.

Please try these steps:

❌ Before proceeding please make a full website backup! ❌
⌥ You can use a plugin for this.
See: http://wordpress.org/plugins/duplicator/

1. Check this article and try the workaround explained there:
- https://wpml.org/errata/language-switcher-might-be-wrongly-rendered-in-some-circumstances/

2. To verify that the issue is caused by a CSS conflict, please try to activate a different theme (eg. Twenty Fifteen)

3. Try installing the WPML flag in menu Extended plugin and try the different settings in Settings -> WPML flag in menu Extended -> General Settings and Styling tabs.
- https://wordpress.org/plugins/wpml-flag-in-menu-extended/

4. Can you please provide your WPML Debug information in the debug field below?
- http://wpml.org/faq/provide-debug-information-faster-support/

Please note that the language switcher in WPML 3.5 will be completely redesigned.
- https://wpml.org/2016/06/wpml-3-4-woocommerce-multilingual-3-8-released/

August 8, 2016 at 2:56 pm #994687

gregorK-3

Thank you for prompt answer. I tried all points that you suggested, except changing the theme, because of various settings...

Screenshot is what i get with different settings .. no dropdown whatsoever.

Thank you

August 8, 2016 at 3:02 pm #994705

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

can you please provide me with a zipped copy of your theme?

I would like to do some tests on my local install.

You probably want to use DropBox, Google Drive, or similar services.

I will enable your next answer as private so you can provide me the information securely.

Once the problem is resolved I will delete the local file.

Thank you.

August 8, 2016 at 4:41 pm #994860

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

❌ Before proceeding please make a full website backup! ❌
⌥ You can use a plugin for this.
See: http://wordpress.org/plugins/duplicator/

Please try the following steps:

- Go to WPML -> Languages
- Disable the "Display the language switcher in the WP Menu" option
- Add the following CSS code in the "Additional CSS" box

#lang_sel {
    margin-top: 18px;
}

- Save
- Edit the header.php file inside the theme folder (it is better to do it inside the child theme)
- Change line 99 and following from:

<div class="clearfix"></div>
    </div>
    <?php if(conversion_glo_var('conversion-opt-header-fullwidth','',false) != 1) { echo '</div></div>'; } ?>
</nav>	 
<div id="wrapper">

to

<?php do_action('wpml_add_language_selector');?>
<div class="clearfix"></div>
    </div>
    <?php if(conversion_glo_var('conversion-opt-header-fullwidth','',false) != 1) { echo '</div></div>'; } ?>
</nav>	 
<div id="wrapper">

Please let me know if this works or if you need more info about this.

Thank you

August 8, 2016 at 6:29 pm #994971

gregorK-3

Some changes are made, but not in correct position. Certainly I'm working in child theme.

August 9, 2016 at 8:31 am #995648

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

I made some test to reproduce your issue.

Can you please set the Language switcher style to "Drop-down menu" in WPML -> Languages?

Thank you

August 9, 2016 at 8:36 am #995655

gregorK-3

That totally did the trick ..

Thank you very much for prompt help!