Closed (duplicate)
Project:
Translatable Comments
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2009 at 18:47 UTC
Updated:
13 Nov 2009 at 16:22 UTC
Hi,
I'm a little puzzled on this one. I am using translablecomments, which works quite well. However, I ran accross a simialr module that allows the same functionality for nodes. That modification (translatablenodes) only works in D5.
Here is the code:
if (Drupal.jsEnabled) {
$(document).ready(function(){
var link = $("<a />")
.attr("href", "#")
.css({ border:"1px solid #555", padding:"1px 3px", margin:"1px", font:"#dff", float:"right", fontSize:".8em", textDecoration:"none" });
var wrapper = $("<span></span>").css({ float:"right" });
var languages = ["it", "ja", "nl", "pt", "fr", "de", "es", "en"];
$(".comment .content").each(function (i) {
var w = $(wrapper).clone().insertBefore(this);
jQuery.each(languages, function(x){
w.append(link.clone().html(languages[x]).click(function () {
var n = $(this).parent().next();
google.language.translate(n.html(), "", languages[x], function(result) {
if (!result.error) {
n.html(result.translation);
} else alert(result.error.message);
});
this.blur();
return false;
}));
});
In translateable Nodes, the only difference is that "comment" is replaced by "nodes".
Why is working in D5 and not D6?
Does anyone have any ideas as to changes can be made to have this wrok in D6?
Comments
Comment #1
davidtrainer commentedSee #283486: here is translatablenodes