would be perfect if this internationalization module could add one option in VIEW such as:

currently only exist 2 options: "Taxonomy: Term ID" and "Taxonomy: Vocabulary"

this will allow one single vocabulary to... in fact... control multiples languages in one single view.

so far, i gotta make 3 differents views for 3 differents languages and 3 differents vocabularies for the same content... =)



Jose Reyero’s picture

Status: Active » Fixed

There's a language filter in views now

Alan Oliveira’s picture

Status: Fixed » Active
44.26 KB

as I told you before... there is no Language filter avaliable... even on Beta 3 =/

see attach

Jose Reyero’s picture

Component: Module i18nviews » Compatibility
Status: Active » Closed (fixed)
20.33 KB

Please reopen as an issue for views module if you still can't find it.

clausbo’s picture

Hi Jose,

I am looking for the language filter option in views for terms.
Is it correct that it is still not released, or did I miss something?



artscoop’s picture

I can only say that is more than correct.
It is important to be able to filter term views by language, since no other module does it.
But alas... I don't know if filtering terms by language is planned...

dboulet’s picture

Title: View Filter by language » Filter taxonomy terms by language in views
Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Component: Compatibility » Taxonomy

I think that there's been confusion in this thread: the original request was for a views language filter for taxonomy terms, and not for nodes.

I still think that this would be a good feature to add.

dboulet’s picture

Status: Closed (fixed) » Active
dboulet’s picture

Assigned: Unassigned » dboulet

Working on a patch for this.

dboulet’s picture

Status: Active » Needs review
5.71 KB

This patch adds views integration to the i18ntaxonomy module. This provides the term language as a field, a term language filter, and a term language argument handler.

heyyo’s picture

Does this patch works for 6x-1.3 ?

dboulet’s picture

@heyyo, yes, the patch still applies cleanly, and works fine.

c4antonio’s picture

Issue tags: +view, +i18n views
89.04 KB

i apply the patch but when i try to use it show me an error (look the image attached at this post), it's very important for me to understand how to resolve the problem with the translations term. thanks for now!

dboulet’s picture

@cquattro Can you supply more information on how to reproduce this error? What version of Drupal, Views? How is your vocabulary configured? Are you able to save the view to see if it works correctly?

c4antonio’s picture

i use a "acquia drupal 6.15", the view module is "6.x-2.8" and for i18n "Internationalization 6.x-1.x-dev"
create a better image is not possible but is irrelevant, the error appears soon when i choose in a new view to add "term translation" on filter.
my vocabulary is very simple, has 4 term with the option "Per language terms." enabled.

heyyo’s picture

I don't succeed to use this patch. I successfully (I think) applyed the patch. Here is the result of the patching:

[servername]$ patch -p0 < i18ntaxonomy/i18n-DRUPAL-6--1_term_lang_views.patch
patching file i18ntaxonomy/i18ntaxonomy.module
Hunk #1 succeeded at 1042 (offset 4 lines).
patching file i18ntaxonomy/includes/i18ntaxonomy.views.inc
patching file i18ntaxonomy/includes/i18ntaxonomy_handler_argument_term_language.inc
patching file i18ntaxonomy/includes/i18ntaxonomy_handler_field_term_language.inc
patching file i18ntaxonomy/includes/i18ntaxonomy_handler_filter_term_language.inc

When I go to one of my view for taxonomy_term I don't see extra argument, field and filter for term language.

Maybe it's a path problem ? the i18n module is sites/all/modules

My version of Drupal is 6.16
and i18n 6x-1.3

heyyo’s picture

After playing with views, I found the problem. Your patch apply to node views but not for taxonomy views. I think this should be applyed only to taxonomy views, because in node there is already "Node translation" argument/field/filter possibility.

dboulet’s picture

@heyyo, the new field, filter, and argument handler should only apply to taxonomy views, that's how I've been using it. Maybe try clearing your cache to see if that helps.

I'll do some more testing on this to see if I can reproduce these problems that are being reported.

Edit: I was wrong, the new stuff also applies to node views, which works fine too.

heyyo’s picture

Really strange now I can see new argument/filter/field in my taxonomy/term views (overidden). It was certainly a cache problem.

But it doesn't work. Nothing is return when choosing CURRENT_LANGUAGE.

My vocabulary is set to :

Localize terms. Terms are common for all languages, but their name and description may be localized.

It seems to be the problem, because the sql request made by views try to get language in term_data.language but the language is not set there when vocabulary is set to localize terms.

SELECT node.nid AS nid,
term_data.name AS term_data_name,
term_data.vid AS term_data_vid,
term_data.tid AS term_data_tid,
term_data.description AS term_data_description
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
WHERE (term_data.language in ('***CURRENT_LANGUAGE***', '***NO_LANGUAGE***')) AND (node.vid IN (
SELECT tn.vid FROM term_node tn
WHERE tn.tid = 6

heyyo’s picture

@dboulet I saw the patch you made here http://drupal.org/node/346028. Do you think it's related to my problem ? If yes which version of the patch do you recommend, the one in #48 is it compatible with i18n 6x-1.3 ?

dboulet’s picture

@heyyo, this patch wasn't designed for your application, it sounds like what you are trying to do is view term translations (see #346028: Translate taxonomy term names in Views), this patch only works for taxonomy terms which are assigned to a specific language.

dboulet’s picture

@heyyo, the patch in #48 in #346028: Translate taxonomy term names in Views was designed to work with i18n 6x-1.1, and people reported problems when using it with newer versions. There have been a few patches posted since then, you can try one of those.

heyyo’s picture

let's try :-)

dboulet’s picture

@cquattro, sorry I couldn't reproduce your error. It could be an incompatibility with another module. Let us know if you discover any clues.

heyyo’s picture

It's working thanks for your help :-) I applyed the last patch on #119

Why this patch #346028: Translate taxonomy term names in Views is still not comitted ???

danyg’s picture

The patch is working with 6.x-1.3, I'm very grateful for this.

kasiawaka’s picture

Hmm, not sure if I'm missing something here..
Do I understand correctly that this patch should allow to create a view, where taxonomy terms would be one of the filters and the second filter would be the taxonomy term language? So when the taxonomy term filter is exposed to the site user, they would only see the terms from their language of choice not all taxonomy terms that are available under this vocabulary?

I've applied this from #9 but it is not working for me the way I described above - I still have a drop down of the taxonomy terms in both languages instead of the one (current user's language).

I checked the query the view is generating:

	node.nid AS nid, 
	node.title AS node_title, 
	node.language AS node_language, 	
	node_data_field_date.field_date_value AS node_data_field_date_field_date_value, 
	node.type AS node_type, 
	node.vid AS node_vid, 
	node_revisions.body AS node_revisions_body, 
	node_revisions.format AS node_revisions_format, 
	node_data_field_file.field_file_fid AS node_data_field_file_field_file_fid, 
	node_data_field_file.field_file_list AS node_data_field_file_field_file_list, 
	node_data_field_file.field_file_data AS node_data_field_file_field_file_data 
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid 
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid 
LEFT JOIN content_field_date node_data_field_date ON node.vid = node_data_field_date.vid 
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid 
LEFT JOIN content_field_file node_data_field_file ON node.vid = node_data_field_file.vid 
WHERE (node.status <> 0) AND (node.language in ('en')) AND (node.type in ('position_statements')) AND (term_data.language in ('en')) AND (term_node.tid IN (91, 82, 86, 48, 44, 100, 92, 50, 95, 84, 58, 89, 72, 46, 83, 98, 80, 73, 56, 96, 88, 106, 103, 54, 101, 47, 49, 75, 97, 59, 74, 71, 51, 52, 99, 53, 102, 81, 90, 93, 110, 77, 94, 45, 105, 55, 57, 85, 87)

and what that tells me is that we are pulling all the nodes that are
- published,
- are set to be English (en),
- are content type = "position statement"
- are assigned to the taxonomy terms that are English (en)
- the taxonomy terms assigned to that node are one of .. (the long list of numbers)

I think this solution is somehow redundant because if someone setup the taxonomy to be "Translation mode: Per language terms", the English nodes can only be assigned to English taxonomy terms, so checking if the English node is assigned to English taxonomy terms is not providing any value.

What I think would be valuable - and in my understanding what this patch was suppose to be doing as I described at the beginning of this post - the filter should be filtering the (exposed) taxonomy terms to be in the language of choice.

That means that the term language option should not be a separate filter but rather an additional option under "Taxonomy: Term is one of .." or under "Taxonomy: Vocabulary".

I will be working on it in the next couple of days, so would really appreciate any feedback and will post any findings.

kasiawaka’s picture

I found a module (still in dev version but working) that solved my problem. The module is called "Views taxonomy selective filter" and is available here http://drupal.org/project/views_taxonomy_selective_filter

What this module does: narrows down the list of taxonomy terms exposed in a View filter to only those terms that are actually used within the nodes that will show up on this page.

Because I've setup my taxonomy to be "Translation mode: Per language terms", that means that my English nodes are only assigned to English terms and French nodes to French terms.

That module allows me to add a "Taxonomy: Term" filter to my View, expose it and add the checkmark next to "Limit list to terms in the view result". As a result, my drop down with taxonomy terms now only shows the terms that are in use, but shows the terms in the current user's language (because the English nodes are assigned to English terms, French to French - see one sentence above).

That is a great improvement.

dboulet’s picture

@kasiawaka, I think that you might have misunderstood the way that this patch is supposed to work, but I'm glad that you were able to find a solution to your problem. I agree that this filter can sometimes be redundant for node views, but it can still be useful in a lot of cases. The features added by this patch are most useful for taxonomy views, that build a list of taxonomy terms, where you want to display terms of only a certain language.

Benwick’s picture

dboulet's #9 http://drupal.org/node/285494#comment-2647588 patch works for Me used in i18n-6.x-1.4
now i'm able to filter my terms by language
hope that will built in i18n-6.x-1.5
good job, tnx

Jose Reyero’s picture

Project: Internationalization » Internationalization Views
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Taxonomy » Code

Moved to new project. See #788290: Fix views compatibility issues (2.x, 3.x), spin off i18nviews module?

Btw, we don't want any 'views integration' in i18ntaxonomy module. All the views parts should be in i18nviews.

dboulet’s picture

Status: Needs review » Needs work

Alright, fair enough. I'll see if I can find time to put a new patch together.

dboulet’s picture

Status: Needs work » Needs review
4.79 KB
ultimike’s picture

Is this patch meant to work with Views 2.x or Views 3.x?


dboulet’s picture

I've only tested it with Views 2.x.

James Andres’s picture

Fixing broken handler errors in i18nviews-DRUPAL-6--2_taxonomy_views.patch

Mathijs Koenraadt’s picture

I applied patch #35 for Views 3.x and it seems to work fine.


Smath’s picture

I've tested the patch from #35 and it works for me - thanks!

Mathijs Koenraadt’s picture

New patch for 3.x July 21st attached

Mathijs Koenraadt’s picture

dboulet’s picture

New patch for 2.x.

wuh’s picture


fjen’s picture


ykyuen’s picture

Hi all,

i have a drupal 6.19 with following modules installed
Views 6.x-2.11
Internationalization 6.x-1.7

I has a view which is base on taxonomy. currently there is no way to filter the term by language. and i find the following post about using the Internationalization Views Module to solve the problem.
Filter taxonomy terms by language in views

so i installed the Internationalization Views Module (version 6.x-2.0).

after i have enabled the Internationalization Views Module i can't find anything about it. there is still no filter for language in the taxonomy view setting. is that i have missed anything?

Thanks for your help.


dboulet’s picture

Hi Kit,

The patches included here have still not been committed to the project, so you will not get this feature in the latest release of the module.

You can help get this feature in by testing out the patches posted above.

ykyuen’s picture

Thanks for you reply, dboulet.

finally i got it works. but i find a problem in the #40 patch.
after i downloaded the i18nviews module, i downloaded the patch to sites/all/modules/i18nviews. then i run the patch by "patch -p0 < patch -p0 < i18nviews-DRUPAL-6--2_taxonomy_views3.patch". i got the following errors.

Kit-Yuens-iMac:i18nviews kit$ patch -p0 < i18nviews-DRUPAL-6--2_taxonomy_views3.patch
patching file includes/i18nviews.views.inc
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 35.
Hunk #3 FAILED at 69.
3 out of 3 hunks FAILED -- saving rejects to file includes/i18nviews.views.inc.rej
patching file includes/i18nviews_handler_argument_term_language.inc
patching file includes/i18nviews_handler_field_term_language.inc
patching file includes/i18nviews_handler_filter_term_language.inc

so i extracted the i18nviews module again and this time i apply the #35 patch. then everything works fine.

anyway, i get it done now. Thanks again.


dboulet’s picture

To apply the patch from #40, you need to apply it to the latest dev release of the 2.x branch.

justin2pin’s picture

Status: Needs review » Reviewed & tested by the community

#40 worked perfectly for adding a language filter to taxonomy views. Would love to see this rolled into the official release for the module.

Bilmar’s picture


cray146’s picture


ayalsule’s picture

patch in #9 worked for me with
Internationalization 6.x-1.7
Views 6.x-2.11
Views translation 6.x-2.0
You need to clear caches

Itangalo’s picture

Confirming patch in #40, and seconding the opinion in #47. :-)


miro_dietiker’s picture

Status: Reviewed & tested by the community » Fixed

Committed this with some additional comments to the cvs. Patch still needed reroll!
6.x-2.x and 6.x-3.x
Changed filter name to "Taxonomy: Term language"

Not fully tested. Please retest and reopen if something missing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

macjules’s picture

One small point. Rather than go through the process of all of the above, why not just create a node view, add your taxonomy term as a field and node translation: language (current users language) and taxonomy: vocabulary as filters - that actually does the same trick. No patching of taxonomy required.

dboulet’s picture

@macjules, that might give you the same result in some cases, but it's not the same thing at all. Usign a taxonomy view will be much more efficient because it queries the taxonomy tables directly. Also, using a node view will only display the terms that are in use by nodes.

druojajay’s picture

+1 subscribe

goldenboy’s picture

+1 subscribe

anooperoth’s picture

Category: feature » support
Status: Closed (fixed) » Active

while i am applying the patch i noticed that in my i18ntaxonomy module under i18n i am missing these files
1) includes/i18nviews.views.inc.
2) includes/i18nviews_handler_argument_term_language.inc
3) includes/i18nviews_handler_field_term_language.inc
4) includes/i18nviews_handler_filter_term_language.inc

whether i need to install any other module to get these files,or whether i am missing anything..

Thanks in advance

Itangalo’s picture

@anooperoth: Are you using the latest version of the module? Files may have been moved around...

miro_dietiker’s picture

Category: support » feature
Status: Active » Closed (fixed)

The patch has been applied. There's absolutely no need to apply the patch! Simply use the latest version.
Please don't switch issue types (except the original type was wrong) and don't hijack issues.

dedeka’s picture

Please better image next time.

awasson’s picture

This is a very useful feature and I hope to see it in the latest 2.x stable release. Confirming that the patch appears to be rolled into the latest 2.x-Dev but not in the current stable.