prevent relevant content from displaying different languages versions of same node
nogat - October 23, 2008 - 08:52
| Project: | Relevant Content |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Description
hi there,
i am experiementing relevant content module on my website www.planetkaya.com based on drupal 5.
the module works great, but having many versions of same node with different languages, i need to show only the nodes with same language of the current one.
any ideas?
many thanks
nogat

#1
What are you using for your multilingual "stuff"... i18n?
#2
yep, i18n
#3
I'll have to take a look at how i18n groups the nodes together once you translate a node... Eg, if node 10 is the english node and you translate it to french and end up with node 15 as the french one... How does drupal know that node 10 and 15 are difference language versions of the same node?
Also - would you want the language limited to that of the current node? For example... You read an english node on cooking ham and Relevant Content finds some other nodes including "cooking beef", "cooking chicken" and "cooking ham & chicken (in french)"... Technically the french hame & chicken node is more relevant than the cooking beef one (depending on taxonomy) however its not in a matching language.
Any thoughts?
#4
i18n has its own mechanism to select which node types to show the user. possible content selection modes are:
- Only current language and no language
- Only current and default languages and no language
- Only default language and no language
- Only current language
- All content. No language conditions apply
i think best choice is to follow same approach with relevant content as well. maybe some lines of code could be reused.
also i think multilanguage websites are multilanguage becouse we suppose most of the users to speak only 1 language, otherwise we could do it single language, so i don't see any reason to show a related node in another language, it will repesent noise for most of the users.
thank you for the good job!
nogat
#5
I'll have to find time to research this more. To be honest, I have VERY little time on my hands and I personally never make multilingual sites so wont have a chance to develop this feature under the pretence of work either.
I'm perfectly happy to help review patches if anyone wants to help out though!
#6
Same here. Subscribing.
#7
It's 6.x now and it's still not obeying the mutlilingual feature of i18n module. Still displaying cross-language nodes causing duplicate content on my site Classical Chinese Furniture
#8
Hi,
I've patched 6.x-1.4 version so that the module will respect node's language and will only display relevant nodes in that language and language neutral nodes. Similar approach with Similar By Terms module.
#9
Looks ready to be committed - although I think I'll add the language argument after the existing limit argument - that way the "API"-ness of the function doesn't change.
#10
I think the limit argument is always good at last place. But this will sacrifice the API-ness of the function. How do you think?
#11
This has been commited to D6 (dev), needs porting...