I've a localized taxonomy with 3 levels. In a (tabular) view displaying the node title + a column with all taxonomy terms for that node, the terms are correctly translated in the table cells.
The taxonomy is exposed to the user through an exposed filter (term ID with depth, showing hierarchy, drop down list), but the terms in the drop down list are not translated (see screenshot in attachment). The filtering actually works correctly, but it is of course confusing to the end user. Translation does work correctly on "plain" term id (without depth) by the way.
So I assume this is because there's no i18nviews_handler_filter_term_node_tid_depth (working on a quick and dirty patch)
Comment | File | Size | Author |
---|---|---|---|
#11 | 1106294-Exposed-term-with-depth-filter-not-translate.patch | 5.25 KB | Pol |
#1 | i18nviews_termdepth.patch | 4.97 KB | bart.hanssens |
i18nscreenshot.jpg | 54.15 KB | bart.hanssens |
Comments
Comment #1
bart.hanssens CreditAttribution: bart.hanssens commentedquick and dirty patch, basically just copy views_handler_filter_term_node_tid_depth from views to i18nviews, and make sure that i18nviews....tid_depth extends i18nviews...tid
Comment #2
christiaan_ CreditAttribution: christiaan_ commentedThank you very much for the patch - it works perfectly. Also works in 6.x-2.x-dev with views 2 exposed.
+1 for patch #1
Comment #3
Summit CreditAttribution: Summit commentedSubscribing, I do not get any term to be translated, greetings, Martijn
Comment #4
bart.hanssens CreditAttribution: bart.hanssens commentedNote that you may need to flush the caches (at least the Views cache)
Comment #5
pearlliang CreditAttribution: pearlliang commentedThanks bart.hanssens for the patch and thanks christiaan_ for feedback.
It works with my Durpal 6.22 website as well. I am using i18nviews 6.x-2.x-dev with views 2 filters exposed. The taxonomy were translated in views filter with term ID with depth.
Comment #6
mvcworks perfectly for me with drupal 6, views 6.x-2.12, i18n 6.x-1.9, and i18nviews 6.x-2.x-dev. thanks!
(not tagging RTBC because i didn't test in views 3.x)
Comment #7
mathieu CreditAttribution: mathieu commentedSubscribe. Will try later on 6.x-3.x...
Comment #8
j0nathan CreditAttribution: j0nathan commentedSubscribing.
Comment #9
mathieu CreditAttribution: mathieu commented@bart.hanssens: the patch in #1 seems to work in 6.x-3.x-dev, except for the label of the exposed filter. I'm a bit at loss as to what needs to be added to make this work.
I'll keep searching, but if you have an idea, it would be much appreciated.
EDIT: the terms are not sorted either (they are sorted in the original language's order).
Comment #10
mvcfwiw in views 2.x the label is correctly translated with this patch.
Comment #11
PolHello all,
Here is an updated patch, working with latest dev version and using good patch syntax.
Thanks for your work Bart :-)
Comment #12
ShaneOnABike CreditAttribution: ShaneOnABike commentedThis also worked for me against the latest dev... could we push this into the dev branch for 2.x?
Comment #13
miro_dietikerTrailing spaces and tabs...
Please write this cleaner...
Why not add the $where to $subquery as condition() like the original views_handler_filter_term_node_tid_depth does?
Rest seems fine.
Comment #14
AaronBaumanbump