Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Drupal 5.x version of this module used to work differently. Instead of automatically translating nodes, it used to only translate them when a button was pressed. This could be easily achieved with Rules by tying the rule trigger to a CCK checkbox on the node form or something like that. Question is, how to package it?
For now it could be a set of instructions on how to modify the default rule to achieve this.
Going forwards, we could introduce a proper form element on all node forms and write a Rules condition for our new form element, so our rule can react to its state.
Comment | File | Size | Author |
---|---|---|---|
#3 | i18ntranslate.info | 275 bytes | wooni005 |
#3 | i18ntranslate.txt | 4.25 KB | wooni005 |
Comments
Comment #1
klonosI need this too. I mean... if I get this right(?), 'empty' or untranslated nodes will be created for all other enabled languages and the chance to press a button at a later point to get them translated will be given.
If this is the goal of this issue, then indeed it is what I am looking for. Is it?
Comment #2
wooni005 CreditAttribution: wooni005 commentedHi Greg,
Past days I have been busy to solved this issue.
Like I said in my emails to you, my setup is a bit different, but like it was in the old Drupal 5 version. The Drupal 6 version translates automatically the node in all installed languages, but this one only translates the node, which you want to translate. Like the description of the issue.
This setup does not depends on the modules CCK or Rules, it still only depends on Internationalization module (i18n).
Like it is now, it works perfect for me. It translates the body and the title. And synchronizes the taxonomy.
The trick behind the code is that when you push the translate button, my hook_nodeapi receives the 'prepare translation'. On that moment the modules i18nsync and i18ntaxonomy already have filling up the node. But of course still in the original language.
So the given $node completely initialized, I only translate the Title and the Body. This makes the code a lot more simpler. Because I do not touch the original $node administration, I think this solution does not interfere other modules.
In your email you mentioned to use Rules to make the implementation also for other situations, like bulk translation of all selected posts. I think this is a very good idea, but I do not know how to do it nicely. My problem was how to use the node sync mechanisms, like I described (i18nsync & i18ntaxanomy).
It is good to have wishes :-). This is for the next round.
I have not attached a patch file, but the complete .module file and the .info file. The module is called: i18ntranslate. The subdirectory gtranslate-api-php is like in the i18n_auto module.
This module is already live for translating between my dutch site (http://arjanwooning.nl/) and my english site (http://info4admins.com/). Info4admins.com is 2 weeks old now.
Greetings,
Arjan Wooning
Comment #3
wooni005 CreditAttribution: wooni005 commentedPlease rename the i18ntranslate.txt to i18ntranslate.module
Comment #4
wooni005 CreditAttribution: wooni005 commentedAn installation description for i18nTranslate is available now.
You can also download the module here.
In English:
http://info4admins.com/content/automatic-translating-content-drupal-usin...
In Dutch:
http://arjanwooning.nl/content/automatisch-vertalen-van-content-drupal-m...
Success,
Arjan
Comment #5
greg.harveyThis is cool - I need to work out a way to incorporate this in to the main module along with a few other work-flow oriented feature requests. Thanks for this! =)
Comment #6
greg.harveySorry, this project is no longer supported - strongly advise you move to using https://drupal.org/project/tmgmt