Skip to content

Instantly share code, notes, and snippets.

@robdecker
Last active April 28, 2020 22:54
Show Gist options
  • Save robdecker/f92a5a917ff851e73b48c36f5320d4c0 to your computer and use it in GitHub Desktop.
Save robdecker/f92a5a917ff851e73b48c36f5320d4c0 to your computer and use it in GitHub Desktop.
[Views content is duplicated if translated] #d8

On a multilingual site, if content is translated, all translations of the node are often included in views results

What we want:

  • No duplicates
  • Show the translated node, if the translation exists
  • If no translation exists, show the node in its original language

The fix requires a combination of two things:

  1. Instead of translation language, use the filter "Default translation", so that you only get the original/default/source translation for each node.
  2. Then, in Language below Pager, for "Rendering Language", select "Interface text language selected for page". That will select the best available translation for the current language, just like accessing node/1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment