Configure Views for entity-translated content
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
Views can display entity-translated content (nodes) with the following steps:
- Edit view
- Click on Advanced
- Click on Current user's language for Field Language in the Other section
- Check When needed, add the field language condition to the query checkbox
- Click Apply
- Save view
Remember the title_field (from the Title module) should be used if we use fields in our view (there is a content title field and a title_field to select to be displayed). Unfortunately, both of these show up as "Content: Title" when adding fields. The one that has the description "The content title." is the regular title, so choose the other field instead.
If we want the view to only display content of one language (depending on the language detection rules), then
- Add a Entity Translation relationship (with 'Require this relationship' checked). This adds more available filters for your view.
- Add an "Entity Translation: Language" Filter, with the 'current user's language'.
Note: When you use in your view the title_field provided by the Title module instead of the original node title, the "Link this field to the original piece of content" option may not be available (see #1541414: No "Link this field to the original piece of content" option in Views UI for fields replaced with Title module), so that you can display the translated titles, but cannot link them to their nodes. A workaround to this problem is:
- Add a "Link" field to the list of view fields after the "Title"
- Rewrite the output of this field with [title_field] token text
- Check "Output as a link" option
- Exclude the "Title" field from display
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion