You are here

function i18n_translation_set_element in Internationalization 7

Build translation fieldset for object

File

i18n_translation/i18n_translation.module, line 189
Internationalization (i18n) module - Entity translations

Code

function i18n_translation_set_element($type, $object) {
  $element = array(
    '#type' => 'fieldset',
    '#title' => t('Translations'),
  );
  if ($set = i18n_translation_object($type, $object)) {
    $element['values']['#markup'] = i18n_translation_format_items($set
      ->item_list());
  }
  else {
    $element['message']['#markup'] = t('No translations');
  }
  return $element;
}