1

I inherited maintenance of a Drupal 7 site and I don't have much experience with drupal but there is a content type called 'Materials' that we would like to be able to view it's listing representation in different languages. So /materials lists everything in English, but /es/materials should list everything in Spanish but it has both Spanish and English entries. How can I eliminate the English entries so only Spanish ones will show. And, why are English entries displaying in the first place? Mixed Language Content

Here is the language config for the Materials content type, followed by the Materials Views configuration: Content Type and Views Configs

1 Answer 1

0

Use the Internationalizations Views module, which extends the i18n module with multilingual support for views.

Also, to make view results correspond to the language switcher, add a filter for Content Translation: User's Current Language, which is the language that an authenticated user has set in the user settings (it is NOT the same as the current browser language or the site language).

If no option for the User's Current Language is available in the filter criteria form, then verify your configuration at Configuration -> Languages -> detection and selection: The order should be URL, Default, User and not something like Default, URL, User (as mentioned also in https://www.drupal.org/node/1701854#comment-6279474).

Note: The Internationalizations Views module only has an alfa version for D7, but right now there are over 41K users using this version. Therefor I think "DEV" is not a valid release qualifier for that version anymore, because +41K users can't be wrong, right?

2
  • thanks very much for your help Pierre. I found that when editing the view for this Newsletter content type that is in the FILTER CRITERIA section as shown in the last image of my question the setting for Content: Language there has a Language selector that had the following 2 boxes checked "Current user's language" and "English". Unchecking "English" and saving eliminate the English items. Strangely, I still had an item or two with duplicate entries but one with a current language title and another in English. But it's 95% there now. Blessings, Craig
    – Craig
    Mar 16, 2017 at 19:17
  • Merci for the update! Not sure if there is anything else we can help you on with the remaining 5%, but if you can find a way to phrase a new, further narrowed down question, then don't hesitate to post a new (related) question. If you ever do, please drop me another comment about it here (with a link to it or something like that). Mar 16, 2017 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.