Hi all,

I have the following setup (and problem):

  • Drupal 6.19, Views 6.x-3.0-alpha3 and Internationalization Views 6.x-3.x-dev
  • One vocabulary with "localize terms" (terms are common but translated)
  • One vocabulary with "per language terms" (different terms per language ... but they can be assigned to be equivalent on the translation table)

And I am doing the following:

  • Create a view with a taxonomy term ID as argument.
  • I have a filter to select nodes in the user current language.
  • If the term ID argument is present create a list of nodes tagged with it. No problem with that.
  • If the term ID argument is not present I have it set up so "Action to take if argument is not present: Summary, sorted descending", hence creating a list the user can click and the go to the list of nodes.

The problem is that:

  • For the vocabulary with "per language terms" it works fine: I get a list of tags in the user's language.
  • For the vocabulary with "localize terms" I get a list with the default term names :-(

Is there a way to have the that "summary when argument is not present" showing the right term translation? Do I have something wrong with my setup or is it a bug?

Note that it does not even show the names on the site default language: it shows the names you get to the tags when you create them.
Note also that I would like to use the vocabulary with "localize terms" because if I use the "per language terms" then I have some other troubles with the exposed filters ... apart from the fact that my vocabulary actually has no "per language terms" they are all common across every languages so "localize terms" would be the "right thing to do".

Thanks in advance,

Ivan.

Comments

GN’s picture

As far as I understand, I have same kind of problem with per language terms.
When I add "Taxonomy: Term" as an Argument, and set "Action to take if argument is not present" = "Summary", term names in Summary view are not translated.

This problem may be related to a similar issue with per-language term names in exposed filters (#295315: Views: taxonomy terms shown in dropdown lists of exposed filters are not translated, #929368: Terms in exposed filter not translated). For exposed filters, you can use a workaround with Content Taxonomy, but it does not work well for Argument Summary.

ivan_reyne’s picture

I have been taking a further look and I think the problem is that the "summary when argument is not present" is handled by one of the "view_plugins" objects and there is no hook to them in the i18nviews to translate their output.
Note that when you use "per language terms" you have the "translated terms" in the summary because in the data base you are already storing the tags in the right language for the node, not because they are translated at any point.

There is not much documentation about "view plugins", anybody know if it is possible to hook into the "views_plugin_style_summary" "pre_render" method or something like this? Would that be the right thing to do to translate the taxonomy terms or am I barking up the wrong tree?

Regards,

Ivan.

miro_dietiker’s picture

Also in views 2.0 this was somehow limited.

Note that translating terms (e.g. on exposure or argument title) is much more like content translation, compared to static text translation.
It is even possible that some things worked in 6.x-2.x which are now missing.

Open for all suggestions on how to make things work and help how to improve extensibility.

Marko B’s picture

Hey Ivan, did you figure out this problem and found any solution?