l10n_client_import_package_form_submit($form, &$form_state)
contributions/l10n_client/l10n_client.module, line 305
Submission handler for package reimport form.
l10n_client_import_package_form()
<?php
function l10n_client_import_package_form_submit($form, &$form_state) {
if (!empty($form_state['values']['cleanup'])) {
// Clean out all translations first if user asked to do that.
db_query("DELETE FROM {locales_target} WHERE language = '%s'", $form_state['values']['langcode']);
// Also remove all source strings without translations.
db_query("DELETE FROM {locales_source} WHERE lid NOT IN (SELECT lid FROM {locales_target})");
}
// Set up and start batch for new imports.
include_once 'includes/locale.inc';
if ($batch = locale_batch_by_language($form_state['values']['langcode'], '_locale_batch_language_finished')) {
batch_set($batch);
}
$form_state['redirect'] = 'admin/build/translate';
}
?>