The goal here is to show all nodes of a certain type, but only one translation of each set of source/translation(s):

How to list all nodes of a certain type in the user's current language, but fall back to a default for the nodes that are not translated to that specific language?

If a node is neither translated to the user's language nor to the set default (could even be "no language" if that is allowed for that content type), then there should be a way to define a list of all the languages of the site in an order of preference. First language translation that is found for that node is displayed.

Point is: no matter if a node has been translated to the user's language or the site's default or at all, there should still be a way to display it.

Original report by Johnnyk

Hi everyone.

I'm currently building a milutilingual website and I'm have problems filtering my Nodelists.
My setup looks like this: Users can post Nodes in serveral languages and translate them.
They are able to list these nodes in the language they currently browse my website.

What we have: There are times, when one did not translate a node in the language he is currently browsing. When i filter these lists with "current user language" we loose every single node without a translation in the current language.

Wha i need: If the current language is not available then there should be the parent translation node be listed. So if a english version exists list the english parent version if the spanish child version is not tranlated. but don't show the english one if we have a spanish

Maybe it is already possible - but i don't get the clue...
thx

Comments

domesticat’s picture

Status: Active » Closed (fixed)

Closed while closing all Views support requests with no activity for 6 months. If you still need help, you may re-open this issue at any time.

tsvenson’s picture

Version: 6.x-2.x-dev » 6.x-2.9
Component: Documentation » node data
Status: Closed (fixed) » Active

I have stumbled on the same problem.

The site I am working will initially be launched in two language, English and Spanish. English is the default language, but clients will have the option to create their content in any of the languages and then optionally translate it.

The problem though is that if the visitor change the language to Spanish, only nodes that has content in Spanish is listed, there is no fallback to view the English version of a listing when a Spanish is missing. The same goes for when the site is in English.

The "Node translation: Language = Current user's language" option should have an option to allow fallback to for other language so that it would work the same way as the node system works.

tsvenson’s picture

Version: 6.x-2.9 » 6.x-2.11

Setting it to the correct version (annoying that the version drop down doesn't sort numbers correct, must learn to pay more attention to that...).

notabenem’s picture

A partial work-around would be to set:
Language is one of: "User's current language" or "No language".
This will properly list translated nodes to the specified language and nodes that have not been translated yet at all.

However, I also would like to see how to ensure that Views had a "language" listing preference and would ensure that either only nodes in the strict language are listed or ensure that ALL relevant nodes are listed, i.e. the language filter would be a soft-filter with a gradual fallback mechanism.

iamjon’s picture

Category: support » feature

marked #940040: Filter on language should allow to pull in "default language" version - if no translated version is available as a duplicate. and changing this from support request to feature request.

iamjon’s picture

Category: feature » support

I spoke to merlinofchaos about this on irc he suggested that it maybe be possible using relationships

You set up a relationship node -> translated node. I believe the relationship will pick the user's language or the "no language" node if set up right.

Can anyone confirm if this worked for them?

iamjon’s picture

Assigned: Unassigned » iamjon

Assigning to myself for follow up

iamjon’s picture

Status: Active » Closed (duplicate)

I'm marking this as closed from lack of activity. Please feel free to reopen with more information.

iamjon’s picture

Status: Closed (duplicate) » Closed (cannot reproduce)

Marked #984130: Filter translate node as a duplicate.

klonos’s picture

Issue summary: View changes

...rephrasing the problem at hand and generalizing the issue.

klonos’s picture

Version: 6.x-2.11 » 7.x-3.x-dev
Component: node data » Documentation
Assigned: iamjon » Unassigned
Status: Closed (cannot reproduce) » Active

...updated the issue summary to a more generic form. Switching to proper component, latest version and branch and reopening.

leovw’s picture

I am having the same problem - For some Views the content has been translated for some languages but not for all languages... The ideal scenario would be for it to show the View in the users current language and if that is unavailable then it would revert to the default language. Unfortunately this isn't happening?

I have tried the suggestion in comment #6 but it doesn't work for me? Is anybody able to offer any other tips to get this working?

klonos’s picture

The ideal scenario would be for it to show the View in the users current language and if that is unavailable then it would revert to the default language.

The ideal would be for this to be an option because some sites prefer to not show content if it is not in the users' current language. There should be a "Language fallback" section that'd allow to set this as desired.

leovw’s picture

Yep sorry you are totally correct - Having these as 2 fallback options would most definitely be the ideal

boby_ui’s picture

I believe this is not solve yet? anyone have succeeced it? as I have tested in D7 with views7.x.3 and it is still not falling back

Kars-T’s picture

Status: Active » Fixed

Hi

I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

boby_ui’s picture

reopening this issues, using views 3 and language fallback can not work, is there any work around? using i18n.. entity translation is not an option for me as it is not working if it is combined with revisioning module, so I am back with i18n module but now views language fallback are failing :( please help

drzraf’s picture

Component: Documentation » Code
Category: support » task
Priority: Normal » Major
Status: Closed (fixed) » Active

it's a major task, pending for years.
I can't believe this bug has been closed so many times without any reason.
Someone provided a patch for D6 which has been rejected because of performance issues (see #634144: i18n views content negotiation + Mixed current language and #887116: Views filter "i18n: Content negotiation" is not working properly for "Mixed current language (if available) or default lang ...") but AFAIK none of the module (i18n || views) developers suggested a long-term solution.
WTF ?

boby_ui’s picture

what I can summarize that it is not working and not supported at all in anyway...

boby_ui’s picture

Issue summary: View changes

...visually separating original issue summary with an h2 tag

MustangGB’s picture

Status: Active » Closed (outdated)