function lingotek_add_language_specific_targets_batch_create in Lingotek Translation 7.7
Batch worker function for adding language-specific targets
1 call to lingotek_add_language_specific_targets_batch_create()
- lingotek_grid_action_submit in ./
lingotek.bulk_grid.inc - Submit function for The Grid's actions The action corresponds to the key of the option selected Often redirects to batch operations or to other pages entirely
File
- ./
lingotek.batch.inc, line 708 - Central location for batch create functions, before control is handed off to individual batch command files.
Code
function lingotek_add_language_specific_targets_batch_create($entity_type, $entity_ids) {
if (!variable_get('lingotek_enable_language_specific_profiles', FALSE)) {
return;
}
$batch = array(
'title' => t('Adding language-specific translations'),
'finished' => 'lingotek_add_language_specific_targets_finished',
);
$operations = lingotek_get_add_language_specific_operations($entity_type, $entity_ids);
$batch['operations'] = $operations;
$redirect = current_path() === 'lingotek/update-failed-language-specific-targets' ? '/' : current_path();
batch_set($batch);
batch_process($redirect);
}