You are here

function stringoverrides_migrate_admin_import in String Overrides 7

Menu callback for the String Overrides Migrate module to display the import administration

1 string reference to 'stringoverrides_migrate_admin_import'
stringoverrides_migrate_menu in ./stringoverrides_migrate.module
Implements hook_menu().

File

./stringoverrides_migrate.admin.inc, line 10
Stringoverride migration admin.

Code

function stringoverrides_migrate_admin_import() {
  $form = array();
  $form['#attributes'] = array(
    'enctype' => "multipart/form-data",
  );
  $languages = module_exists('locale') ? locale_language_list() : array(
    'en' => t('English'),
  );
  $form['file'] = array(
    '#type' => 'file',
    '#title' => t('File'),
    '#description' => t('Attach your *.po file here to import the string overrides.'),
  );
  $form['lang'] = array(
    '#type' => 'select',
    '#title' => t('Language'),
    '#description' => t('Which language to import the overrides to.'),
    '#options' => $languages,
  );
  $form['import'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
    '#weight' => 3,
  );
  return $form;
}