You are here

function field_i18n_sync_options in Internationalization 7

Field module. Implements hook_i18n_sync_options().

File

i18n_sync/i18n_sync.modules.inc, line 37
Internationalization (i18n) package. Synchronization of translations

Code

function field_i18n_sync_options($entity_type, $bundle_name) {
  $sync_fields = array();
  if ($bundle_name) {
    $instances = field_info_instances($entity_type, $bundle_name);
    foreach ($instances as $name => $instance) {
      $sync_fields[$name] = array(
        'title' => $instance['label'],
        'description' => $instance['description'],
        'field_name' => $instance['field_name'],
        'group' => 'fields',
      );
    }
  }
  return $sync_fields;
}