Posted by timmillwood on July 15, 2008 at 8:13am
I am developing a multilingual site and not all nodes will be in all the languages so I want to give the user the option to choose the order the node's language is shown.
For example the site offers English, Spanish and French, a frech user is browsing the site and comes across a node which is only available in Spanish or English. I want there to be a profile setting which tells drupal if Spanish is not available user language X or use language Y.
Is there a module for this?

Comments
Please clarify...
This doesn't make sense to me. A node can only be in one language (or language neutral) so if you French user comes across a Spanish node which is in a translation set with an English translation but not a French one, he will see that and can navigate to the French one. If you use the content translation system you can always show which languages have translations of the visited node.
Can you be more specific about exactly what you want to do?
It would not be difficult to do
I think I understand. For example, an Italian can probably understand written Spanish fairly easily, so if I were Italian I would want to see:
(1) The Italian version of the content, if it exists, or:
(2) The Spanish version of the content, if that exists, or:
(3) The English version of the content as a last resort.
.. in that specific order of preference. The system should automatically switch me to the correct version. I would need to be able to define my personal preferences, i.e. it/es/en (in that order) somewhere in my profile.
Is this what you need Tim? If so, I'm pretty sure no module currently exists to do it, but it would not be a huge development task - I've recently done some a multi-language related partial re-write of the Global Redirect module (not a supported release, so not officially available) and as you may know I'm also the author of Language Sections - what I mean is, I know enough about the topic to say with some level of confidence that it would be a small project to create such a module. Sorry but I can't offer to do it for you, I'm just too busy right now (um, unless there's funding :) but if you have the PHP/Drupal knowledge yourself or can find someone to help, it should be a relatively small task (a day's work maybe, not counting documentation, in-depth testing, etc.)
Edward, if I understand your project needs correctly, wouldn't something like this be useful for you too? Even if you have many languages supported, and all content exists in all those languages, there's still a case for personal preference. E.g. I speak Dutch, German and English, so if you don't have Dutch I want to see German first rather than English. As you say, the user can manually select each time, but that would become really tiresome on a site that had many languages but not necessarily all content in all languages. See what i mean?
Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.
yeh thats what I am looking
yeh thats what I am looking for.
So I guess I will have to be developing more custom modules.
Module or patch?
You could either implement it as a module, or a patch to i18n - maybe worth talking to them first to see if they'd recognise it as a standard need. To me it would seem to be a logical extension to the existing language preference option that allows you to define a single language of preference.
The i18n module decides at the moment to show you either the chosen language, or the site default language if the chosen language is unavailable. I'd guess that's the part of the code you would need to hook into (but I don't know where it is.)
The profile part you could do with standard profile module - add a profile field called "Language Preference Order" or something like that.
If you do it as a module, I think the approach would be either to redirect the url, or maybe hook into the node api to pull up different content without redirecting. i18n patch would probably be simpler, but obviously not a good general solution unless it gets incorporated.
Further thought: redirecting to a different url would not be a great solution because the language would change for the whole system (menus, blocks, etc.) and not just the node being viewed.
Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.
Useful for docs.drupal.org
This would be really interesting for the future docs.drupal.org.
For a site with lots of languages, it would be useful if I can hide links to translations I'm not interested in. Some time in the future when I'm reading the glorious, multilingual Drupal docs, I'd like to be able to see, on each handbook page, links to the Norwegian, Danish, Swedish, and English versions. If one version is hard to understand or appears outdated, I want to easily switch to another one that I understand. But if I have to see the full list of all available translations, odds are the few languages I can read will disappear in the crowd.
By the way, here's an older thread about the same topic.
--
Hilde Austlid, Drupalchick
--
Hilde Austlid, Drupalchick
Hiding "irrelevant" translations
Good point, I hadn't thought about the need for listing only relevant translations (those which the user wants to see listed because he/she can understand that language.) Tim hasn't been back here to update us - any module under devlopment? Maybe I'll add it to my never ending to-do list.
Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.
I haven't started work on it
I haven't started work on it yet, but it has come as a requirement from my "customer" for a project that should be launched within the next year. So if no one develops it first I will have to one day.
Did anyone ever implement this?
We are having similar issues, and this would be a good solution.
i18n
It seems to be in the Internationalization module for Drupal 7, there: Home→Administration→Configuration→Regional and language→Languages→"User interface text language detection" (beta version). But I've not succeeded yet in getting it work.