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.

CommentFileSizeAuthor
#3 i18ntranslate.info275 byteswooni005
#3 i18ntranslate.txt4.25 KBwooni005
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klonos’s picture

I 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?

wooni005’s picture

Hi 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

wooni005’s picture

FileSize
4.25 KB
275 bytes

Please rename the i18ntranslate.txt to i18ntranslate.module

wooni005’s picture

An 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

greg.harvey’s picture

Assigned: Unassigned » greg.harvey
Status: Active » Needs work

This 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! =)

greg.harvey’s picture

Status: Needs work » Closed (won't fix)

Sorry, this project is no longer supported - strongly advise you move to using https://drupal.org/project/tmgmt