Drupal: Redirct to node translation form

This CodeLet redirects the user to translate the node in the specified lanaguge. This will reduce the efforts to click on the translation tab and can enhance to transalte the nodes in all the enabled langauges, one-by-one.

CodeLet: 

//$Id$

/**
* @file
*
* Redirect to translation form of a node
*
* @author DrupalD
*/

/**
* Implementaion of hook_nodeapi
*
* @param unknown_type $node
* @param unknown_type $op
* @param unknown_type $a3
* @param unknown_type $a4
* @author DrupalD
*/
function autotranslate_node_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'insert':
drupal_goto("node/add/page", "translation=". $node->nid ."&language=en");
break;
}
}

By DrupalD on Fri, 06/09/2013 - 12:47pm

Add comment

Log in or register to post comments
QR code for this page URL This page URL
Feedback