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
Comment #1
domesticat CreditAttribution: domesticat commentedClosed 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.
Comment #2
tsvenson CreditAttribution: tsvenson commentedI 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.
Comment #3
tsvenson CreditAttribution: tsvenson commentedSetting it to the correct version (annoying that the version drop down doesn't sort numbers correct, must learn to pay more attention to that...).
Comment #4
notabenem CreditAttribution: notabenem commentedA 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.
Comment #5
iamjon CreditAttribution: iamjon commentedmarked #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.
Comment #6
iamjon CreditAttribution: iamjon commentedI 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?
Comment #7
iamjon CreditAttribution: iamjon commentedAssigning to myself for follow up
Comment #8
iamjon CreditAttribution: iamjon commentedI'm marking this as closed from lack of activity. Please feel free to reopen with more information.
Comment #9
iamjon CreditAttribution: iamjon commentedMarked #984130: Filter translate node as a duplicate.
Comment #9.0
klonos...rephrasing the problem at hand and generalizing the issue.
Comment #10
klonos...updated the issue summary to a more generic form. Switching to proper component, latest version and branch and reopening.
Comment #11
leovw CreditAttribution: leovw commentedI 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?
Comment #12
klonosThe 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.
Comment #13
leovw CreditAttribution: leovw commentedYep sorry you are totally correct - Having these as 2 fallback options would most definitely be the ideal
Comment #14
boby_ui CreditAttribution: boby_ui commentedI 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
Comment #15
Kars-T CreditAttribution: Kars-T commentedHi
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.
Comment #17
boby_ui CreditAttribution: boby_ui commentedreopening 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
Comment #18
drzraf CreditAttribution: drzraf commentedit'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 ?
Comment #19
boby_ui CreditAttribution: boby_ui commentedwhat I can summarize that it is not working and not supported at all in anyway...
Comment #19.0
boby_ui CreditAttribution: boby_ui commented...visually separating original issue summary with an h2 tag
Comment #20
MustangGB CreditAttribution: MustangGB commented