Batch callback: Save data of imported files.
$context: Contains a list of imported files.
function locale_translate_batch_import_save($context) {
if (isset($context['results']['files'])) {
foreach ($context['results']['files'] as $file) {
// Update the file history if both project and version are known. This
// table is used by the automated translation update function which tracks
// translation status of module and themes in the system. Other
// translation files are not tracked and are therefore not stored in this
// table.
if ($file->project && $file->version) {
$file->last_checked = REQUEST_TIME;
locale_translation_update_file_history($file);
}
}
$context['message'] = t('Translations imported.');
}
}