infojunkie
infojunkie

Reputation: 1090

View of nodes and their translations

I'm trying to create a view of nodes and their translations. Specifically, I want each row to show the node title for each language.

The way I'm doing it right now is by filtering the view by a specific language, then adding one relationship of type "Node translation: Translations" for each language on the site. I can then choose the "Node: Title" field, once for the original language and once per relationship.

The problem with this approach is that the nodes that don't exist in the filtered language, but exist in other languages, are not included in the view. That's what I need help with.

Upvotes: 5

Views: 3475

Answers (2)

infojunkie
infojunkie

Reputation: 1090

I finally got around to solving this (on Drupal 7).

The idea is to filter the view by Content translation: Source translation, then adding one Content translation: Translations relationship for each language.

In addition, a special join handler is used to handle nodes that have no translations. The handler code is on GitHub.

I've created a demo of this approach.

Upvotes: 3

Nikit
Nikit

Reputation: 5128

One of way: Just do it without relationships, but use sorting via "Node translation: Translation set node ID", so you get ordered list of nodes, there translated versions of node will followed one by one...

Upvotes: 2

Related Questions