You are here

function lingotek_nodeapi in Lingotek Translation 6

File

./lingotek.module, line 123

Code

function lingotek_nodeapi($node, $op, $teaser, $page) {
  if ($node->language == "") {
    $node->language = variable_get('lingotek_neutral_language', 'en');
  }
  switch ($op) {
    case 'view':
      $view_mode = '';
      if ($page) {
        $view_mode = 'full';
      }
      lingotek_node_view($node, $view_mode);
      break;
    case 'update':
      lingotek_node_update($node);
      break;
    case 'delete':
      lingotek_node_delete($node);
      break;
    case 'insert':
      lingotek_node_insert($node);
      break;
  }
}