You are here

function module_globallink_import_translation in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink.api.php \module_globallink_import_translation()
  2. 7.6 globallink.api.php \module_globallink_import_translation()

By implementing this hook, you can modify translated node before it's imported in Drupal. This hook is called just before the translated node is saved in the database.

Parameters

$source_nid: The node id of the source node object.

$target_node: The translated node object about to be saved in database.

File

./globallink.api.php, line 77
This file provides an example for the implementation of hooks that other modules can implement. Please read documentation for more details.

Code

function module_globallink_import_translation($source_nid, &$target_node) {
  $source_node = node_load($source_nid);
  $target_node->title = 'TEST ' . $source_node->title;
}