Hi, I am wondering how you deal with the following problem with the language switcher.
Suppose you have a website with English (default) and Spanish. Both languages configured with language prefix, language negotiation is with prefix with fallback. You add a page:
example.com/en/welcome (node/1), and translate it:
example.com/es/bienvenido (node/2).
If you're at the 'welcome' page, and click the language switcher for Spanish, you'll go to example.com/es/bienvenido, great.
Now you publish a story, say example.com/en/some-story-title(node/3), but there is no translation. Now when you click 'Spanish' from there, it will take you to example.com/es/node/3, even though this is an English story.
example.com/es/node/3 Should not exist, and now you have duplicate content...
So how do you stop the language switcher block from linking to this inconsistent url?
How to prevent incorrect node translation link in lang switcher?
Hi, I am wondering how you deal with the following problem with the language switcher.
Suppose you have a website with English (default) and Spanish. Both languages configured with language prefix, language negotiation is with prefix with fallback. You add a page:
example.com/en/welcome (node/1), and translate it:
example.com/es/bienvenido (node/2).
If you're at the 'welcome' page, and click the language switcher for Spanish, you'll go to example.com/es/bienvenido, great.
Now you publish a story, say example.com/en/some-story-title(node/3), but there is no translation. Now when you click 'Spanish' from there, it will take you to example.com/es/node/3, even though this is an English story.
example.com/es/node/3 Should not exist, and now you have duplicate content...
So how do you stop the language switcher block from linking to this inconsistent url?