here is translatablenodes

zanoman - July 16, 2008 - 17:28
Project:Translatable Comments
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

First of all, thank you for this gem.
I found your project interesting and needed something like that on the node level too.
I just replaced 'comments' with 'nodes' and it worked out of the box.
I'm not a developer, and won't go into support :)

So here is the mod.

Phil

AttachmentSize
translatablenodes.zip8.65 KB

#1

bigplanet - March 1, 2009 - 20:40

Just wondering, translateablecomments seems to be up and working in 6, but translatablenodes (submitted unofficially by Phil) doesn't.

I've looked at the code, and all that is different is that "comment" is replaced by "node". What happened in 6 to make this script stop working?

#2

asak - June 28, 2009 - 19:34

No idea.. but thet0olman tried .body and didn't get it either... ( #447394: translatable body )

#3

jsmm - July 10, 2009 - 16:54

Yes, translatablecomments is a great module, thanks. If applied to nodes, its functionality would put Drupal at the lead of internationalization efforts in multilingual community sites. An interesting example can be seen in http://es.xihalife.com/b/panicattack/3385/

So, if it's not difficult for developers to apply it to nodes, why not doing it?

I would love to try the submitted patch. Unfortunately, I cannot get it to work either. Any help?

Thanks,

#4

zanoman - July 24, 2009 - 23:12

Sorry for replying late, I hate not receiving updates by email.
Actually I made translatablenodes for Drupal 5 as stated in version.

AFA I understand, the only thing you want to change is in jquery.translatablenodes.js at the line stating:
$(".node .content").each(function (i) {

replace ".node .content" by the div of the text you want to translate (from css).
For example, see www.togethearth.com
project mission text is ruled by [main .node .content #mission.og-mission] (in CSS I mean).
If I want to translate project missions (when it's below 500 characters), I change to ".og-mission" in jquery and it will appear only for mission.

If I want both, it's a little bit complicated since ".node .content" appears twice for me, so ".view-content-og-ghp-ron .node .content|.og-mission" made the trick for me.

If it helped you and you're interested about green innovation, feel free to visit us.

 
 

Drupal is a registered trademark of Dries Buytaert.