You are here

function stringoverrides_admin_export_submit in String Overrides 6

Submit-handler for stringoverrides_admin_export.

1 string reference to 'stringoverrides_admin_export_submit'
stringoverrides_admin_export in ./stringoverrides.admin.inc
Ability to export a *.po file.

File

./stringoverrides.admin.inc, line 332
Admin page callbacks for the String Overrides module.

Code

function stringoverrides_admin_export_submit($form, &$form_state) {
  drupal_set_header('Content-Type: text/plain');
  drupal_set_header('Content-Disposition: attachment; filename: "stringoverrides.po"');
  $export = stringoverrides_admin_export_text($form_state['values']['lang']);
  drupal_set_header('Content-Length: ' . strlen($export));
  echo $export;
  exit;
}