All options default to 'original' language

burgs - January 27, 2009 - 16:57
Project:Select translation
Version:6.x-0.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

If you have a website thats default language is english, and someone creates a node in dutch (nl) and no one has translated it at all, some one surfing the site in spanish (es) will see the node in dutch. I can understand them seeing it in English, because that is the default language.

Can we change the "Language priorities" textbox to only default back to original if we type it in there please?

#1

burgs - January 27, 2009 - 17:09
Status:active» needs review

Ok, here is a patch that solves my issue, as well as a tiny spelling mistake.

AttachmentSize
select_translation.patch 1.78 KB

#2

Anselm Heaton - February 4, 2009 - 12:27

f you have a website thats default language is english, and someone creates a node in dutch (nl) and no one has translated it at all, some one surfing the site in spanish (es) will see the node in dutch. I can understand them seeing it in English, because that is the default language.

If a node has not been translated at all, how can it show the English version ???

Can we change the "Language priorities" textbox to only default back to original if we type it in there please?

The reason it always adds the 'original' version in the list, is because that is the only version that is guaranteed to exist. So if none of your alternatives are available, it will display it in the original version.

The only other option would be to not display articles that aren't available as one of the selected languages. Is this what you are after ?

#3

burgs - February 6, 2009 - 10:06

Yeah, but the patch makes it so that you can type 'original' into the textbox if you want to fall back on it, but you are not forced to fall back on it.
The original "is the only version that is guaranteed to exist" but i personally think that this doesn't matter. If the translations in the list don't exist, then show nothing for that particular node.
People can still add original into the textbox if they want. Is that cool?

#4

Anselm Heaton - February 6, 2009 - 11:46

Ok, I think you are right. Users should have the option to not return articles if they are not in one of the selected languages.

A couple of things though :
1. Your patch breaks backwards compatibility (in particular with some of my own sites!!!). I would suggest having a tick box (selected by default) that says something like "return in original language if not found".

2. For consistency across the module's features, the function select_translation_of_node in select_translation.module should be adapted in the same way (ie. have an optional argument, true by default, to return the original if languages are not found. I guess it would be ok for it to return NULL if nothing is found).

Thanks for your input to this module :)

#5

hstrindb - June 9, 2009 - 07:01

Hi Anselm!

Thank you for a very useful module! Your idea is brilliant!

The other behavior - to not show a node if not translated to the chosen language - is possible already by using the filter Node Translation.

All best / Henrik Strindberg

 
 

Drupal is a registered trademark of Dries Buytaert.