I work with a multilingual site in English and Spanish, where English is the default language. Some of the nodes are available in both languages, some only in either English or Spanish.
Since most of our visitors are able to understand both languages, I want to display the content in their preferred (current) language - but if a node is not translated, then I want to display it in the other.
So that if you choose Spanish, but an article is only available in English, then you just see that one in English, while everything else is in Spanish.

For now, I worked around that by marking all nodes that are not yet translated as "no language", and by selecting content as "only current and no language". That's not really correct, but at least it works.

However, this does not work any more, once I work with THREE languages (e.g. English (default), Spanish and Portuguese, because now I can end up with a node, that is already translated in one language but not in the other. If I got a Portuguese node that has been translated to English, then it won't show up any more when I choose Spanish as current language, because for the first translation I need to set the languages.

A solution would be a choice of "current OR default" language (instead of "current AND default" which gives me every translated article twice).
Even better would be a choice of "current OR original language"

A feature like that works on www.indymedia.org

Comments

drewish’s picture

I'd been looking at this and I don't think there's an easy way to solve it generally. Basically you'd be rewriting every query to add a sub-select to check for original nodes... which would be a bitch for performance.

NEOatNHNG’s picture

I agree with clara9 that this would be a nice feature. I'm working for a open source project where some news may have been added but our translators haven't translated it yet, in that case we want to show our visitors the English one, marking some translations as no language is not a thing we could easily do.

But I also see the problem mentioned by drewish.
I tried to think of an easy way to make this happen but I couldn't think of one. But I'm no SQL magician (in fact my knowledge of SQL is very limited).
Maybe you could provide the option with a note that this may be slow, so one could leave this on but disable it when being under a /. or something.
I also had a look at Joomla how they solved the problem, but they have a totally different plugin system (when I looked at the drupal code I could figure out what was done there even though I'm not familiar with PHP but the Joomla code (actually it's in a plugin/component/module called Joom!Fish) left me totally in the dark).

drewish’s picture

i ended up building a module to do exactly this. i'll post a note here when it's released.

drewish’s picture

Status: Active » Fixed
giorgosk’s picture

Subscribing

-Anti-’s picture

subscribing

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

ifrik’s picture

Thanks a lot,
I tried this new module and it seems to do the trick!

jose reyero’s picture

Implemented into 5.x-3- version, see http://drupal.org/node/203798