Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi. I've been searching google and this site for an answer to this but haven't found a solution yet.
Basically, I'm trying to create a view that filters based on the user's currently selected language (from the language switcher). In the Filter Criteria in my View I have four options for 'translation':
- Content translation: Source translation
- Content translation: Translation set node ID
- Content translation: Translation status
- Node translation: Child translation
However, I'm missing the one criteria that I need, namely:
- Node translation: Language = Current user's language
Here's what I've tried:
- Adding 'Content translation: Translations' relationship in my View and selecting All languages
- Enabling 'User Follow the user's language preference.' in config/regional/language/configure and making it the first choice in the list.
- I have all the i18n modules enabled, and also Views Translation
What else can I do? How do I get this criteria to be listed in the filter? Thank you!
Comments
Comment #1
casaran CreditAttribution: casaran commentedAdd the following filter to your view: Content: Language. Then select is one of Current user's language. Basically you shouldn't look at translations filters but use the language of the content.
Comment #2
MustangGB CreditAttribution: MustangGB commented