Wrong links when there is no translation

anantagati - November 29, 2008 - 14:09
Project:Drupal
Version:6.6
Component:translation.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I have site with 3 languages. I enabled Language switcher block and found that when node is translated at least to one language Language switcher block show correct links.

But when there is no translations (for example node/23 is only in English and for Dutch and French there are not translation) Language switcher shows links for all languages (for example /en/node/23, /nl/node/23 and /fr/node/23). Problem is that it should show only link to English.

If somebody use one of links /nl/node/23 or /fr/node/23 it switch to some mix language environment.

Attached is a patch which fixes it. And all languages which don't have translation for specific node are unset in translation_translation_link_alter().

AttachmentSizeStatusTest resultOperations
problem-when-no-translation.patch398 bytesIgnoredNoneNone

#1

kevinseo - December 3, 2009 - 05:43

Hi, good post.
I have been thinking about this issue, so thanks for writing. I will certainly be subscribing to your blog.

 
 

Drupal is a registered trademark of Dries Buytaert.