Closed (fixed)
Project:
Related Block
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Oct 2010 at 21:18 UTC
Updated:
9 Apr 2011 at 04:11 UTC
In a multilingual installation, the block returns a number of nodes that are in different languages -- particularly when there are names involved in the titles. Is there any way to restrict the search to only articles in the current user's language?
Comments
Comment #1
Dr Jay commentedI'm changing this to a bug report as there is a problem in the code. Around line 170:
But the localizer module has been deprecated since the 5.x branch and replaced with internationalization (i18n). So for 6.x installations, this code needs to be revised in order to work correctly on multilingual sites.
Comment #2
spidermanI've started working on this, and appear to have it working in what I imagine is the simplest possible use-case. The multilanguage stuff in core now makes this easier, but the i18n module has many configuration options, which makes this feature a little tricky.
I'd love to hear any feedback about common usage scenarios for this, or options you'd like to see the module provide, I'll fill in a more detailed feature. Meantime, I'm going to think this through and research i18n a little more to make an educated guess at the best way to approach this.
Comment #3
spidermanThis turned out to not be too hard at all. With the new global $language variable in 6.x, I could provide basic support for language-sensitive "relevance" with a trivial change to the do_search() query. I've gone one step further and added default support for i18n module's "content selection mode" so that it reflects content based on the site-wide selection for what content languages to display by default.
I have committed this feature and rolling it into a 1.1 release, but would love to have some feedback and testing on how it might be tweaked or made more useful. Patches always welcome :)