We have a site with 3 different languages and each language is detected by sub-domain. One of the taxonomies we use is representing types of products and have terms in all 3 languages inside:

CategoryQ (se)
   CategoryW (se)

CategoryE (no)
   CategoryR (no)

CategoryT (da)
   CategoryY (da)

I faced with problem regarding contextual filters and taxonomy terms. I have view with contextual filter accepting term name and displaying nodes related to this term:

Content: Has taxonomy term ID (with depth)

Also added validation and "Filter value type" set to "Term name converted to Term ID".

All worked fine until we discovered that we have couple of terms that have same names in all languages (we are not translating terms, all terms are added separately for each language - BL requirement):

CategoryG (se)
   CategoryY (se)

CategoryG (no)
   CategoryX (no)

CategoryG (da)
   CategoryZ (da)

Processing contextual filter Drupal takes first term tid he found in database (with lowest tid) and use that constructing view's query. In our case Drupal takes SE term instead of NO. So basically there is no language control in contextual filter at all. Is it possible to somehow add this control with hooks or some modules maybe?

1 Answer 1


Temporary solution for was to create patch file to override views module functionality a little bit. Patch can be found under issue on drupal.org https://www.drupal.org/node/2466001#comment-9795191.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.