Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue with the language switcher in DropDown format on their mobile device. When pressing the ∨ button, it automatically jumps to English, preventing the selection of other languages, whereas on PC, hovering over it displays other languages for selection.
Solution:
We recommend modifying the CSS to prevent the current language from being clickable on mobile devices. This can be achieved by adding the following CSS code:

.mobilex-menu .wpml-ls-current-language a {<br />    pointer-events: none;<br />    cursor: default;<br />}

This change should resolve the issue by disabling the link action when the ∨ button is pressed. If this solution does not resolve the issue or if it becomes outdated, please check our related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance.

0% of people find this useful.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Prosenjit Barman 1 year ago.

Assisted by: Prosenjit Barman.

Author Posts
June 28, 2024 at 1:30 am #15847506

安 漢成

Background of the issue:
I have a language switcher in DropDown format on my site under development.(hidden link

Symptoms:
On my mobile, when I press the ∨ button, it jumps to English and I can't select other languages. On PC, hovering over it displays other languages so I can choose.

Questions:
Why does the language switcher jump to English on mobile when I press the ∨ button?
How can I make the language switcher work correctly on mobile devices?

June 28, 2024 at 5:57 am #15849277

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for contacting WPML Support.

I understand the issue you're having. Typically, clicking on the current language in the language switcher should not trigger a reload or redirect. However, it appears that the icon is included within the anchor tag, causing the page to reload when you click the button. To address this, you can hide the current language from being clickable using CSS. Add the following CSS to solve the issue:

.mobilex-menu .wpml-ls-current-language a {
    pointer-events: none;
    cursor: default;
}

Please let me know if that helps in solving the issue or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

June 29, 2024 at 5:24 am #15856255

安 漢成

Dear Prosenjit,

Thank you for your reply.

I was able to solve the problem with your advice.

I could select the language with this, but I couldn't navigate,
.mobilex-menu .wpml-ls-current-language a {

so I did this.
.mobilex-menu .wpml-ls-current-language > a {

Best regards,
an