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?
Kommentare
Thanx for all
hi ;
tanks , really tanks for your guidance in translation site , its very useful , i study all of topics in your site & now my site is a multilingual .
good luck
Language switcher does not always appear
In case the language switcher does not appear, you can try the following:
Enable at least 2 languages, and then edit language negotiation.
You can find this at Home » Administer » Site configuration » Languages » Configure
Choose "Path prefix with language fallback"
Cheers
Frank
thanks a lot frank, it worked
thanks a lot frank, it worked for me and i was seaching this answer for a long time :)
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?
Did you receive an answer?
Hi there,
I think this is an important question - have you received an answer on this?
Cheers