Skip Navigation

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

Problem:
The client was experiencing an issue where the navigation menu language switcher worked on desktop but not on mobile. The language flag expected on mobile was not appearing, and the switcher could not be clicked or used to switch languages.
Solution:
Initially, we asked the client to check if the problem persisted and to increase the WordPress memory limit as per WPML's minimum requirements, which can be done by adding the following code to the wp-config.php file:

/* Memory Limit */<br />define('WP_MEMORY_LIMIT', '256M');

After further investigation, we identified that the issue was related to the theme handling the dropdown. Our compatibility specialists resolved the issue by adding custom CSS code in WPML -> Languages -> Language switcher options -> Additional CSS. This fix allowed the language switcher to function correctly on mobile devices.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please do not hesitate to open a new support ticket at WPML support forum.

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 2 replies, has 0 voices.

Last updated by Carlos Rojas 1 week, 2 days ago.

Assisted by: Carlos Rojas.

Author Posts
February 10, 2025 at 1:24 pm #16687150

martijnS-12

Background of the issue:
I am trying to make the navigation menu switcher work on mobile. You can try it yourself: hidden link

Symptoms:
The navigation menu switcher works in desktop mode, but not on mobile. I expected to see a flag of another language, but instead, I got nothing.

Questions:
Why does the navigation menu switcher not work on mobile?
How can I fix the issue with the language flag not appearing on mobile?

February 10, 2025 at 2:11 pm #16687824

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting us

1.- I have visited the site on the PC and on my cellphone and I can see the language switcher in the menu. Could you double-check if the issue persists and if so, share a screenshot?

2.- Please increase the WP memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');

- Add it above the line /* That's all, stop editing! Happy blogging. */

You can double-check the WordPress memory limit in WPML -> Support

Regards,
Carlos

February 10, 2025 at 2:15 pm #16687851

martijnS-12

Yes, you can view the language switcher.
But you can't click it or switch language on mobile.

Yes I will increase the memory limit, but this can't be the solution to the problem.

February 10, 2025 at 2:31 pm #16688040

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Thanks for your message. Now I can see the problem.

I suspect that the cause of the issue is the theme, which is the one who handles the dropdown. However, I would like to take a look at the WPML configuration. Could you create a staging site with a copy of the live site and share the access credentials in your next message that I have set private?

Note: The WordPress memory is a minimum WPML requirement, so it needs to be increased.

Looking forward to your message.

February 11, 2025 at 9:37 am #16690629

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Thank you very much for sharing the credentials requested.

I tested this issue in a sandbox site, which means that there is a compatibility issue. I have escalated this ticket to our compatibility team to find a solution.

February 12, 2025 at 12:50 pm #16696435

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hi there,

Our compatibility specialists added CSS code to fix the issue. The CSS code was added in WPML -> Languages -> Language switcher options -> Additional CSS

Can you confirm that the issue was solved?

February 13, 2025 at 7:54 am #16700317

martijnS-12

Thanks, the issue is resolved with the CSS code you added!

February 13, 2025 at 1:01 pm #16702277

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Great!

Please don't hesitate to contact us if you need our help in the future.