You are here

function i18n_string_admin_refresh_form in Internationalization 7

Form callback. Refresh textgroups.

1 string reference to 'i18n_string_admin_refresh_form'
i18n_string_menu in i18n_string/i18n_string.module
Implements hook_menu().

File

i18n_string/i18n_string.admin.inc, line 14
Helper functions for string administration.

Code

function i18n_string_admin_refresh_form() {

  // Select textgroup/s. Just the ones that have a 'refresh callback'
  $groups = array();
  foreach (i18n_string_group_info() as $name => $info) {
    $groups[$name] = $info['title'];
  }
  $form['groups'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Select text groups'),
    '#options' => $groups,
    '#description' => t('If a text group is no showing up here it means this feature is not implemented for it.'),
  );
  $form['delete'] = array(
    '#type' => 'checkbox',
    '#title' => t('Clean up left over strings.'),
    '#default_value' => TRUE,
  );
  $form['refresh'] = array(
    '#type' => 'submit',
    '#value' => t('Refresh strings'),
    '#suffix' => '<p>' . t('This will create all the missing strings for the selected text groups.') . '</p>',
  );
  return $form;
}