You are here

function i18nsync_taxonomy in Internationalization 5

Same name and namespace in other branches
  1. 5.3 experimental/i18nsync.module \i18nsync_taxonomy()
  2. 5.2 experimental/i18nsync.module \i18nsync_taxonomy()

Implementation of hook taxonomy.

File

experimental/i18nsync.module, line 70
Internationalization (i18n) package. Synchronization of translations

Code

function i18nsync_taxonomy($op, $type = NULL, $edit = NULL) {
  switch ("{$type}/{$op}") {
    case 'vocabulary/insert':
    case 'vocabulary/update':
      $current = variable_get('i18n_vocabulary_nodesync', array());
      if ($edit['nodesync']) {
        $current[$edit['vid']] = 1;
      }
      else {
        unset($current[$edit['vid']]);
      }
      variable_set('i18n_vocabulary_nodesync', $current);
      break;
  }
}