0

How do I show only language specific and translated taxonomy terms in a field which references a taxonomy?

In my xyz content type I have taxonomy reference fields. While translating the content created using "xyz" content type, I would like to show only language specific taxonomy terms (either translated or created in that specific language).

How can I achieve this?

As suggested by Clive I have created a entity reference view which shows only languages specific and translated terms. Here is the screen shot of the same. enter image description here

But when I link that view from product category field which is of type entity reference it shows taxonomy terms in default language i.e. English in my case instead of Spanish Language but the terms are filtered as per language i.e. Spanish. Here is the screen shot of the same. enter image description here

Can somebody please suggest if I am missing a step here ?

  • That's the behaviour I see out of the box - what are you seeing instead? – Clive Apr 4 '18 at 11:28
  • I see all the taxonomy terms translated as well as not translated ones.For example if I have four values a,b,c,d and a is translated I see a-spanish,b,c,d. – user3560198 Apr 4 '18 at 11:42
  • Oh right, yes you'll see any terms you haven't translated in their original language. I suppose you could use a View as the source for the entity reference field and filter out the untranslated terms that way – Clive Apr 4 '18 at 11:56
  • Clive are you suggesting to use entitybrowser or inlineentityform which can work on a custom view ? Actually I didn't want to take that approach because I am currently using chosen module and it's formatters – user3560198 Apr 4 '18 at 12:03
  • No - core allows you to choose a View with a specific display to drive the data for an entity reference field. It won't affect the form widget you're using, just provide you with filtered data – Clive Apr 4 '18 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.