[Resolved] Enable language switcher troughout the whole website
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.
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?
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.
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?
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?
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.