My current installation is Drupal 6.15 with Views 6.x-2.1 and Internationalization 6.x-1.4.
I have a Vocabulary with Per language terms, contains five items in English and another five "translated" items in Greek.
A few of these items have the same name in both Languages.

Example, these terms describe the technology used on a website, so we have: Drupal[English] and Drupal[Greek], Flash[English] and Flash[Greek] and so on...

So now, I want to create a View that will display my nodes filtered on the Taxonomy: Term name. I used the Taxonomy: Term Id [since the help text says that is more efficient], with Argument type: Term name/synonym converted to Term ID.

This setup works perfectly when the taxonomy terms from my vocabulary are different[translated], but when the terms have the same name as the example above, the view does not display any results for Greek, but works properly for English.

Researching this problem I came across http://drupal.org/node/285494#comment-2647588, where we achieve to add the language of the terms, but as far as I could see this does not resolve my problem.

I would appreciate any assistance on this issue.

Comments

dwb17’s picture

An update/solution that resolves this issue, not in the correct way in to alter the views_plugin_argument_validate_taxonomy_term.inc file and add a language Where clause to the "convert" case line 121.

Global $language;
	    $lang = $language->language;
            .....
            $result = db_fetch_object(db_query("SELECT td.* FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid WHERE (td.name = '%s' OR ts.name = '%s') AND td.language = '%s' $and", $argument, $argument, $lang));


Jose Reyero’s picture

Project: Internationalization » Internationalization Views
Version: 6.x-1.4 » 6.x-2.x-dev
Component: Taxonomy » Code
dwb17’s picture

Status: Active » Closed (fixed)