You are here

function translation_taxonomy in Internationalization 5.2

Same name and namespace in other branches
  1. 5.3 translation/translation.module \translation_taxonomy()
  2. 5 translation/translation.module \translation_taxonomy()

Implementation of hook taxonomy.

File

translation/translation.module, line 831

Code

function translation_taxonomy($op, $type = NULL, $edit = NULL) {
  switch ("{$type}/{$op}") {
    case 'term/insert':
    case 'term/update':
      if (!$edit['language'] && $edit['trid']) {

        // Removed language, remove trid
        db_query('UPDATE {term_data} SET trid = 0 WHERE tid = %d', $edit['tid']);
        if (db_affected_rows()) {
          drupal_set_message(t('Removed translation information from term'));
        }
      }
      break;
  }
}