Posted by bigplanet on March 2, 2009 at 6:47pm
Jump to:
| Project: | Translatable Comments |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
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
#1
See #283486: here is translatablenodes