- 当用户在荷兰语中查看网站时，显示所有荷兰文章 - 但也是未经翻译的英语
- 当用户以德语查看网站时，显示所有德语文章 - 也是未经翻译的英语。
但在我的情况下，需要能够设置为"en + nl" 或"en + de" 。就像一个人可以用分类法"有分类物" ，我想要像"有语言" 这样的东西。
So for this site I'm building I need to be able to do the following.
The contextual filter, 'Content translation: Language' only allows to put in one value. That is either a language specified, or all.
But in my case it would be required to be able to set for instance "en+nl" or "en+de". Like one can do with taxonomy 'Has Taxonomy', I would like something like 'Has Language'.
I solved this task like so:
One solution would be to use field translation:
I guess you need this module: https://www.drupal.org/project/select_translation
it provides language fallback functionality for nodes translated with Content Translation (not Entity translation) inside views listings. This is an alternative to the Views "Field Language" option which would not work for nodes translated with Content Translation.
To have a View with a default language fallback if a node translation doesn't exist and then show the default language one, just ensure UNCHECK:
X When needed, add the field language condition to the query