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

VIEW --> FILTER --> GROUPS:TAXONOMY --> TAXONOMY LANGUAGE
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... =)

thanks!

Comments

Status:Active» Fixed

There's a language filter in views now

Status:Fixed» Active
StatusFileSize
new44.26 KB

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

see attach

Component:Module i18nviews» Compatibility
Status:Active» Closed (fixed)
StatusFileSize
new20.33 KB

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

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?

Thanks.

/Sbo

Hi,
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...

Title:View Filter by languageFilter 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.

Status:Closed (fixed)» Active

Assigned:Unassigned» dboulet

Working on a patch for this.

Status:Active» Needs review
StatusFileSize
new5.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.

Does this patch works for 6x-1.3 ?

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

Issue tags:+view, +i18n views
StatusFileSize
new89.04 KB

hi,
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!

@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?

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.
it'all.

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

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.

@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.

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
))

@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 ?

@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.

@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.

let's try :-)

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

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 ???

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

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:

SELECT
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.

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.

@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.

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

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.

Status:Needs review» Needs work

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

Status:Needs work» Needs review
StatusFileSize
new4.79 KB

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

-mike

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

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

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

Thanks!

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

New patch for 3.x July 21st attached

Correct version

New patch for 2.x.

Subscribing

subscribing

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.

Regards,
Kit

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.

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.

Regards,
Kit

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

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.

subscribing

subscribing

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

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

RTBC.

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.

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.

@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.

+1 subscribe

+1 subscribe

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

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

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

anooperoth
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.

Please better image next time.

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.