简体   繁体   中英

copy CCK content (for auto translations) upon new content created tigger in drupal

what I want and need to do is upon the event that triggers when a new node is created, is first to translate it into every language enabled except the one is created and copy and even translate if possible the CCK content.

I'm doing this with triggers and it is creating and translating the content but only the title and body (non CCK)

What I want to do is copy the images that were uploaded on the original node, set the dropdowns, etc etc.. of course it wouldn't be bad to use the i18n gtranslate to translate the textboxes and textfields to the translated CCK on the new node when the event triggers :)

I'm sure this problem was solved before, but I don't know how to affect the newly created node and use it's CCK ... and how to refer to the original node from which is being translated on the php evaluation block..

If you are using the module Rules , you will be able to create "actions" which is basically a callback where you can do whatever you want. You execute those actions when an event is triggered (let's say for example when a node is created) and if a set of conditions is evaluated to true (node type, if some fields have some particular values etc). In this action callback you can fetch the "source node", generated a new node which your translations on each field and then save a node for each language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM