Translated node with Any locale parent node shows up twice.
pearcec - February 14, 2007 - 16:46
| Project: | Localizer |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
Lets say I start a story with "Any" locale with the content in English, then translate to Spanish, but leave French and German untranslated. Everything show up in English and for the Spanish folk among us they see it twice in English and Spanish. Don't you think they should see it for just for Spanish? In my mind starting with Any means this is the default translation if no other translation is found. Unlike starting with a specified locale, then that means you want the information to only show up for people of that locale. I think this method supports all desired implementations.
I tried it every which what is Global View Support on and off. And disabling views module.

#1
It does not happen to me.
in admin/settings/localizer try to play with the options
in particular with
Locale initial detection options (I have enabled the browser detection)
Multilingual Content support (I have enabled)
Multilingual Content display for Authenticated and Anonymous ( I only have "When switching user interface locale, switch also the content locale" checked in both cases)
#2
I don't want to turn on multilingual support. That isn't how we plan on using our site. And I don't really see how that makes a difference. I should mention this is from a standard frontpage view.
#3
pearcec,
I do not agree with you about how ANY should work. A node with locale of ANY should show up no matter what language is being viewed. In your example, if the user was viewing in German, they would then see the English (ANY) message. For sites that typically do NOT have all content translated in the available languages, one would want ANY to be sure the content is "pushed" to the user. The current ANY functionality might also be good for legal statements that might need to only be in the "original" language.
However, I can see how the functionality you describe could be very useful. Maybe this would be a locale called "DEFAULT" or something like that. I suggest that you add this as a feature request.
#4
The problem is not multilingual support.
The original purpose of "Any" is exactly what Edward has described.
A content that should appear in every language.
>Any means this is the default translation if no other translation is found
A sort of fall-back content.
I think that we should keep Any as attribute for content that must appear
every time and add a system to define a fall-back default node for a nodes
group.
Implementing a fall-back mechanism is not so easy.
It is possible for single content view, but is is extremely
complex for contents list.
We have only a method to control and modify the contents
lists. It is implemented in the function localizernode_db_rewrite_sql.
So, if you are calling a contents list in Spanish language, how can
you modify the SQL code to get the nodes in Spanish and if Spanish
translation is not available, to get the missing nodes in fall-back language ?
I thinks it cannot be done with a simple join, and we cannot use subselects.
The only solution that I can imagine is to extract the list of the nodes id
to show before , manipulate it, and then passing it to where condition of the main sql.
#5
Try posting on module development forum ... maybe we can find an sql guru there to help out with this.
#6
EdInJapan,
I just don't see why you would want a user to see both the ANY (Consider it default, like English) and then have the translated version in the same list. Is this what you want on your site?
Trying to expand on your "legal" content. Would you want the legal content to only be in the "Default language"?
I'm am not trying to start a battle here. I am just trying to understand your position further. And to make sure I properly communicated mine.
#7
ANY is intended when you have only that node in a translation nodes groups,
for example for an image, or a node that must be the same in every language.
My proposal : leave ANY to its original purpose and
add an attribute to a node that says :
"This node contains the default translation for this group of translations" ?
What do you think ?
Thanks
#8
Do we need a flag for the sql-statement?
Otherwise I think we can choose a sensible default without explicitly marking it:
1.) If there's a translation with the site's default language, take it
2.) If there's a node with locale=any, take it
3.) If there's a node with locale english, take it (ev. make a priority list of languages instead of this)
4.) we better not get here ;-)
If we want a flag for the sql-statement, maybe we can automatically set it with an algorithm like the above?
#9
pearcec,
Thanks for the response. I am happy that another pro-active person has joined the ranks of Localizer users.
Roberto probably gave a better example of the use of the ANY function. In my example of legal statements, there are many times when only one language "rules" legally simply because of subtle differences in translation. For this reason, the "ruling language" needs to be there all the time. (Regardless if the visitor can understand it or not.) Of course this could be done through any number of methods, but ANY works too.
I also believe that there are times when you want to "force" content to someone regardless of selected locale, in which case ANY as currently implemented would do.
However, I do understand your situation and believe it would be a great added feature if it can be pulled off. I agree with you that what you have described will work in most cases and would eliminate the nuisance of "duplicate" content.
#10
> I am happy that another pro-active person has joined the ranks of Localizer users.
Agreed, localizer was no contest compared to i18n.
> add an attribute to a node that says : "This node contains the default translation for this group of translations" ?
I think to start that is to much per node configuration. I think in most cases if not all people would rather just have their default language assume the role if a global flag was set. Personally I would want the site to just behave this way by default.
[ ] Show default language for node if current locale translation does not exists.
ray007,
You method overrides the default functionality of ANY, which is make it show up no matter what.
#11
I can't imagine a situation where I'd want to display the 'any' language to a user instead of the translated content, if it exists. So introducing a new 'default' option sounds quite strange to me.
The proposed behaviour can be achieved in several ways:
If we can not implement one of these options into core node listings with sql_rewrite, we should go ahead and use Views.
#12
Marking as duplicate of http://drupal.org/node/108317