Skip Navigation

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

Problem:
The client was experiencing an issue where some flags were not displaying in the language switcher on their mobile site. They were using the

do_action('wpml_add_language_selector');

PHP code and had selected "Dropdown" as the language switcher style.

Solution:
We recommended that the client ensure they pass the

type="custom"

attribute in the language switcher shortcode, like this:

[wpml_language_switcher type="custom" flags=1 native=1 translated=1][/wpml_language_switcher]

Then, they should navigate to WPML > Languages > Custom language switchers, click Enable, click Customize, and then select "Dropdown Click" in the Language switcher style.

We also provided a link to the documentation for further guidance: Custom Language Switcher documentation.

Additionally, we requested the client to provide debug information by following the instructions here: How to provide debug information.

If the solution provided is not relevant due to being outdated or not applicable to your case, or if you continue to experience issues, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket for further assistance at the 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 4 replies, has 4 voices.

Last updated by Mihai Apetrei 1 year, 1 month ago.

Assisted by: Mihai Apetrei.

Author Posts
April 18, 2024 at 12:12 pm #15538378

saitamaJ

I am trying to:

Link to a page where the issue can be seen:
https:missav.plus on mobile

I expected to see:
Flag svg must display

Instead, I got:
Some flag not display

April 19, 2024 at 7:17 am #15542049

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Thank you for contacting the support forum.
Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

It seems you are using language swticher shortcode.

Please make sure you pass the type="custom" in shortcode.
Like

[wpml_language_switcher type="custom" flags=1 native=1 translated=1][/wpml_language_switcher]

Then go to WPML > Languages > Custom language switchers
click Enable and click Customize then select "Dropdown Click" in Language switcher style.

Please see this doc https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/#the-settings-part

Also, please go to WPML > Support > Debug Information and give me the information in the next reply. You can read the detailed instruction here: http://wpml.org/faq/provide-debug-information-faster-support/

Thanks

April 19, 2024 at 8:28 am #15542251

saitamaJ

I'm using PHP code

do_action('wpml_add_language_selector');

I already did it but I select "Dropdown"

Then go to WPML > Languages > Custom language switchers
click Enable and click Customize then select "Dropdown Click" in Language switcher style

April 20, 2024 at 4:34 am #15545404

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Could it be that you were able to solve this issue already?

I can currently not see any issue with the flags on your site.

All flags are showing up as expected. If I did not spot the issue correctly, please send us a link to a page where we can see the problem.

If you do not need further assistance, please mark this ticket as resolved.

April 23, 2024 at 11:18 am #15555472

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

I am assigning this ticket back to you.

If the issue has already been resolved (from our side, it looks like it was but we just want to make sure), can you also please mark this ticket as resolved?

Thank you and good luck with the project!