Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#40 | i18nviews-DRUPAL-6--2_taxonomy_views3.patch | 5.5 KB | dboulet |
#39 | i18nviews-DRUPAL-6--3_term_language_views-285494-38.patch | 1.87 KB | Anonymous (not verified) |
#38 | i18nviews-DRUPAL-6--3_term_language_views-285494-38.patch | 4.84 KB | Anonymous (not verified) |
#35 | i18nviews-DRUPAL-6--2_taxonomy_views-v2.patch | 4.91 KB | James Andres |
#32 | i18nviews-DRUPAL-6--2_taxonomy_views.patch | 4.79 KB | dboulet |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedThere's a language filter in views now
Comment #2
Alan Oliveira CreditAttribution: Alan Oliveira commentedwell...
as I told you before... there is no Language filter avaliable... even on Beta 3 =/
see attach
Comment #3
Jose Reyero CreditAttribution: Jose Reyero commentedPlease reopen as an issue for views module if you still can't find it.
Comment #4
clausbo CreditAttribution: clausbo commentedHi 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
Comment #5
artscoop CreditAttribution: artscoop commentedHi,
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...
Comment #6
dboulet CreditAttribution: dboulet commentedI 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.
Comment #7
dboulet CreditAttribution: dboulet commentedComment #8
dboulet CreditAttribution: dboulet commentedWorking on a patch for this.
Comment #9
dboulet CreditAttribution: dboulet commentedThis 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.
Comment #10
heyyo CreditAttribution: heyyo commentedDoes this patch works for 6x-1.3 ?
Comment #11
dboulet CreditAttribution: dboulet commented@heyyo, yes, the patch still applies cleanly, and works fine.
Comment #12
c4antonio CreditAttribution: c4antonio commentedhi,
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!
Comment #13
dboulet CreditAttribution: dboulet commented@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?
Comment #14
c4antonio CreditAttribution: c4antonio commentedi 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.
Comment #15
heyyo CreditAttribution: heyyo commentedI 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
Comment #16
heyyo CreditAttribution: heyyo commentedAfter 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.
Comment #17
dboulet CreditAttribution: dboulet commented@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.
Comment #18
heyyo CreditAttribution: heyyo commentedReally 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
))
Comment #19
heyyo CreditAttribution: heyyo commented@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 ?
Comment #20
dboulet CreditAttribution: dboulet commented@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.
Comment #21
dboulet CreditAttribution: dboulet commented@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.
Comment #22
heyyo CreditAttribution: heyyo commentedlet's try :-)
Comment #23
dboulet CreditAttribution: dboulet commented@cquattro, sorry I couldn't reproduce your error. It could be an incompatibility with another module. Let us know if you discover any clues.
Comment #24
heyyo CreditAttribution: heyyo commentedIt'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 ???
Comment #25
danyg CreditAttribution: danyg commentedThe patch is working with 6.x-1.3, I'm very grateful for this.
Comment #26
kasiawaka CreditAttribution: kasiawaka commentedHmm, 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:
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.
Comment #27
kasiawaka CreditAttribution: kasiawaka commentedI 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.
Comment #28
dboulet CreditAttribution: dboulet commented@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.
Comment #29
Benwick CreditAttribution: Benwick commenteddboulet'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
Comment #30
Jose Reyero CreditAttribution: Jose Reyero commentedMoved 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.
Comment #31
dboulet CreditAttribution: dboulet commentedAlright, fair enough. I'll see if I can find time to put a new patch together.
Comment #32
dboulet CreditAttribution: dboulet commentedComment #33
ultimikeIs this patch meant to work with Views 2.x or Views 3.x?
-mike
Comment #34
dboulet CreditAttribution: dboulet commentedI've only tested it with Views 2.x.
Comment #35
James Andres CreditAttribution: James Andres commentedFixing broken handler errors in i18nviews-DRUPAL-6--2_taxonomy_views.patch
Comment #36
Anonymous (not verified) CreditAttribution: Anonymous commentedI applied patch #35 for Views 3.x and it seems to work fine.
Thanks!
Comment #37
Smath CreditAttribution: Smath commentedI've tested the patch from #35 and it works for me - thanks!
Comment #38
Anonymous (not verified) CreditAttribution: Anonymous commentedNew patch for 3.x July 21st attached
Comment #39
Anonymous (not verified) CreditAttribution: Anonymous commentedCorrect version
Comment #40
dboulet CreditAttribution: dboulet commentedNew patch for 2.x.
Comment #41
wuh CreditAttribution: wuh commentedSubscribing
Comment #42
fjen CreditAttribution: fjen commentedsubscribing
Comment #43
ykyuen CreditAttribution: ykyuen commentedHi 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
Comment #44
dboulet CreditAttribution: dboulet commentedHi 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.
Comment #45
ykyuen CreditAttribution: ykyuen commentedThanks 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
Comment #46
dboulet CreditAttribution: dboulet commentedTo apply the patch from #40, you need to apply it to the latest dev release of the 2.x branch.
Comment #47
justin2pin CreditAttribution: justin2pin commented#40 worked perfectly for adding a language filter to taxonomy views. Would love to see this rolled into the official release for the module.
Comment #48
Bilmar CreditAttribution: Bilmar commentedsubscribing
Comment #49
cray146 CreditAttribution: cray146 commentedsubscribing
Comment #50
ayalsule CreditAttribution: ayalsule commentedpatch 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
Comment #51
Itangalo CreditAttribution: Itangalo commentedConfirming patch in #40, and seconding the opinion in #47. :-)
RTBC.
Comment #52
miro_dietikerCommitted 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.
Comment #54
Anonymous (not verified) CreditAttribution: Anonymous commentedOne 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.
Comment #55
dboulet CreditAttribution: dboulet commented@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.
Comment #56
druojajay CreditAttribution: druojajay commented+1 subscribe
Comment #57
goldenboy CreditAttribution: goldenboy commented+1 subscribe
Comment #58
anooperoth CreditAttribution: anooperoth commentedwhile 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
Comment #59
Itangalo CreditAttribution: Itangalo commented@anooperoth: Are you using the latest version of the module? Files may have been moved around...
Comment #60
miro_dietikeranooperoth
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.
Comment #61
dedeka CreditAttribution: dedeka commentedPlease better image next time.
Comment #62
awasson CreditAttribution: awasson commentedThis 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.