You are here

function i18n_taxonomy_field_info_alter in Internationalization 7

Implements hook_field_info_alter()

File

i18n_taxonomy/i18n_taxonomy.module, line 299
i18n taxonomy module

Code

function i18n_taxonomy_field_info_alter(&$info) {

  // Change default formatter for term reference fields
  $info['taxonomy_term_reference']['default_formatter'] = 'i18n_taxonomy_term_reference_link';

  // Translate field values.
  $info['taxonomy_term_reference']['options_list_callback'] = 'i18n_taxonomy_allowed_values';

  // Sync callback for field translations
  $info['taxonomy_term_reference']['i18n_sync_callback'] = 'i18n_taxonomy_field_prepare_translation';
}