Skip to content Skip to sidebar

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

Last updated by Mohamed Sayed 1 year, 5 months ago.

Assisted by: Mohamed Sayed.

Author Posts
March 4, 2024 at 7:53 am #15367782

olgaD-8

Tell us what you are trying to do? Hello, can you help me please i need to put a Flag by menu by mobile version and Tablet. Thank you!

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

March 4, 2024 at 2:08 pm #15370044

Mohamed Sayed

Hi Olga,
Thanks for contacting WPML support.

1. To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/

2. I checked the site on mobile and I see the language switcher with flags already exists. Please see here: hidden link

Could you please tell me more details about what you're trying to achieve?

Kind regards,
Mohamed

March 4, 2024 at 2:36 pm #15370195

olgaD-8

Hi Mohamed, thank you for your responce. I would like to put language flag here by mobile and tablet version, next to menu sign, see screenshot.(red arrow)

Best regards, Olga

flags.png
March 4, 2024 at 7:44 pm #15371863

Mohamed Sayed

Hi,

There is no direct option in WPML settings to add the language switcher to custom locations like mobile header.

To achieve this, please follow this guide to add the language switcher to the custom location using PHP or shortcodes: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/

March 7, 2024 at 5:41 am #15382209

olgaD-8

Hello, thank you for your reply. I cant do it through widget. Is there any code that i can add to header in order to show this flag only by mobile and tablet version next to the menu? I am using WPCode – Insert Headers and Footers plugin. Maybe you can help. Thank you. Best regards, Olga

March 7, 2024 at 12:04 pm #15384045

Mohamed Sayed

Hi,

In this case, you can use one of the PHP actions mentioned here: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/#language-switchers-using-php

But I'm not sure if the WPcode plugin can run this code on mobile header only, so you might need to add it to the theme's mobile header template file.

You can also follow this guide to create a custom language switcher: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/