Skip Navigation

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

Last updated by Osama Mersal 1 year, 3 months ago.

Assisted by: Osama Mersal.

Author Posts
September 10, 2023 at 8:41 am #14370563

colasB

I am trying to: Modify the switcher on the Template Homepage to make it as in the screenshot attached. When I do the modification on the Template Page, it only change the FR version of the Home, and the list of flag to switch language is not well placed. The EN flag is not below the FR one.

Link to a page where the issue can be seen: hidden link compared to hidden link

I expected to see: The modifications I did on the FR page on the EN page as well and the second flag on the list well placed below the first flag so that it's easy to click on it and visible.

Instead, I got: Different version of the language switcher between EN and FR pages and sthe list of flag not well placed on the switcher I have on the FR version.

Changes to make for flags to be aligned.jpeg
EN page without any changes taken into account.png
Language switcher placement wanted.png
September 11, 2023 at 8:59 am #14373891

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) I checked the language switcher in both languages, and it seems to work correctly. (Kindly check the attached screenshot)

Please let me know if the issue has been fixed. If not, kindly let me know the steps to reproduce the issue.

2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me a lot of information about how your site is configured.

Best regards,
Osama

2023-09-11_11-57-12.jpg
September 11, 2023 at 9:03 am #14373957

colasB

Hi !
Thanks for your message.
That's really weird, because I didn't change anything since my last message...
I would like to have a list of choice with the FR flag and the US flag (not the UK) on the left side of the screen. With both flags on the same alignment. Could you help me with that, please?

September 11, 2023 at 9:19 am #14374165

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

1) In order to use the US flag, you need to change the flag of the language, not only in the language switcher.

Please check our guide about changing the language's flag. (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-flags/)

2) You can change the language switcher location according to how it's added. If you added it using a page builder, you can edit your design there.

If you use a PHP template, you can change the location using CSS. (Kindly check the attached screenshot)

Best regards,
Osama

2023-09-11_12-15-51.jpg
September 11, 2023 at 12:44 pm #14376273

colasB

Hi! Thanks for your reply. I did the changes that you told me. As you can see on the screenshot from the EN version of the website, I have the flags in the dropdown list I want, but when I click i don't have any list coming, I cannot click on the French flag. Also, the changes are not effective on the FR version of the website. Could you please have a look?

English website.png
french website.png
September 11, 2023 at 12:48 pm #14376325

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please let me know how you added this language switcher. Also, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed.

Your next answer will be private, which means only you and I can access it.

❌ Please backup your database and website ❌

✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

September 11, 2023 at 1:17 pm #14376623

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please add the login URL and the access details in the private reply. If you don't see the form below, please don't add your credentials, as they will be publicly exposed٫ (hidden link)

Thanks,

September 11, 2023 at 2:44 pm #14377461

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. I installed the "All-in-One WP Migration" plugin to create a local copy to debug the issue without affecting your site.

I was able to find a workaround for this issue by the following steps:

1- Edit the "Page" template
2- Add the language switcher as a shortcode (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/)
3- Save the template (Kindly check this hidden link)
4- Go to WPML-> Translation Management and send the template to translation
5- Translate the template
6- Edit the French home page to make sure that it uses the same template and update it (Kindly check this hidden link)

After that, the switcher works correctly when clicking on it in both languages. (Kindly check this hidden link)

Please note the you can customize the switcher added by shortcode via WPML-> Languages-> Custom Language Switcher section. (Kindly check this hidden link)

Best regards,
Osama

September 11, 2023 at 6:36 pm #14379211

colasB

Hey Osama,

Thank you very much for your support.

We get lost when we have to send the page template to translation as it's not a page but a design template aimed to apply for the whole site...

So now the right dropdown with the correct flags appears properly on the top left corner of the EN page, but there is still the USA flag alone that stays there while it shouldn't (deleted from the page template...) And this dropdown does not appear once we go on the French website, there are still the two FR and USA flags aligned on the top right corner.

Thanks in advance for your guidance
Best
Colas

September 11, 2023 at 6:51 pm #14379269

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please check if the language switcher is the same in both languages.

Best regards,
Osama

September 11, 2023 at 6:53 pm #14379271

colasB

Hi,

Yes it is.

Thank you!