Skip to main content
DrupalABC

Main navigation

  • Home
  • Search
  • Learn Drupal
  • Certifications
  • Drupal Code Finder
User account menu
  • Log in

Breadcrumb

  1. Home

How to show only nodes translated in current page language in views?

Whenever working on a multilingual website you must have noticed that views by default start showing all the translations of available nodes in separate rows. This might be a required behaviour sometimes but most of the time it is very confusing for the users and feels like content duplicacy. This can easily be solved by setting 2 additional settings in the views:

1. Add Filter -> Respective Entity (Translation Language) = Content Language Selected for the Page.

2. Rendering Language = Content Language Selected for the Page.

In case you are using relationships as well in the view (and related entities are marked translatable as well), you might have to set a translation language filter for all the entities. Feel free to set different values for these 2 options to achieve the required behaviour.       

Tags
Views
Drupal8
Drupal 9
Disqus
DrupalABC

Footer

  • Buy me a coffee
  • Drupal.org profile
  • LinkedIn
Powered by Drupal

Drupal is a registered trademark of Dries Buytaert