Skip Navigation

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

Problem:
The client is trying to enable a language switcher throughout the whole website using WPML but is unable to find documentation related to this.
Solution:
If you're experiencing issues with enabling a language switcher on your website, it might be due to the content post type (CPT) being set as not translatable. To display the language switcher without translating the posts, you can use the default language as a fallback for untranslated content. We recommend checking our guide on displaying untranslated content in secondary languages.

If this solution does not apply to your case, or if it seems outdated, please open a new support ticket. We also 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. For further assistance, you can contact us directly through our 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.

This topic contains 5 replies, has 1 voice.

Last updated by marcialB 6 days, 18 hours ago.

Assisted by: Osama Mersal.

Author Posts
December 5, 2024 at 3:29 pm #16482563

marcialB

Background of the issue:
I am trying to enable a language switcher throughout the whole website using WPML. The site I need help with is hidden link. I have shared a video for reference: hidden link.

Symptoms:
I didn't find any documentation related to enabling a language switcher throughout the website.

Questions:
How can I enable a language switcher throughout the whole website using WPML?

December 6, 2024 at 9:51 am #16485277

Laura
Supporter

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

It's not clear how you configured your CPT. If you set it as "not translatable", it explains why you don't see the language switcher. However, content set as not translatable is still visible in all languages by design - because it's not assigned to any language.

You may try to set the CPT as "fallback on the default language", that should work.

If your case is different, please provide us with your debug information so we can better understand the problem.

December 9, 2024 at 9:09 am #16491453

marcialB

Hi Laura

Yes, you are right, it's set to "not translatable". But I would still like to show the flags so users can switch the current language. How can I do that?

Thanks for your help!

December 9, 2024 at 12:17 pm #16492665

Osama Mersal
Supporter

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

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

Hi,

I'm Osama from WPML forums support. I'll be glad to help you today.

If the CPT is set to be not translatable, the language switcher won't show there.

If you need the language switcher and don't want to translate the posts, please use the default language as a fallback for untranslated content.

Kindly check this guide to know more about displaying untranslated content in secondary languages.

Best regards,
Osama

December 9, 2024 at 4:26 pm #16494215

marcialB

Hi Osama

Thank you very much. This is definitely a step in the right direction. But I don't want the posts to be actually translatable. Is there a way to hide the translation options from the backend? Maybe it's possible to load the language switcher in the frontend as if the setting is set with the fallback option, but actually still having not translateable as the real setting?

I hope you can follow me. Thanks for your help!

December 9, 2024 at 4:30 pm #16494221

Osama Mersal
Supporter

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

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

Hi,

I'm afraid that the language panel in the back end as the CPT is set to be translatable.

However, the secondary languages will fall back to the default language if you don't translate them.

You can ignore that backend language panel when editing the posts.

WPML has no option to hide the language panel from the dashboard, but you can hide it using custom CSS.

Best regards,
Osama

December 18, 2024 at 8:51 am #16524768

marcialB

Thank you for your explanations. We decided to customise the language selection based on the backend language because we don't want the cpt to be translatable.