function l10n_update_batch_import in Localization update 7
Same name and namespace in other branches
- 6 l10n_update.batch.inc \l10n_update_batch_import()
- 7.2 l10n_update.bulk.inc \l10n_update_batch_import()
Create a batch to just import files.
All update sources must have a 'uri'.
Parameters
$updates: Translations sources to be imported. Note: All update sources must have a 'fileurl'.
$import_mode: Import mode. How to treat existing and modified translations.
Return value
array A batch definition for this import.
File
- ./
l10n_update.batch.inc, line 41 - Reusable API for creating and running l10n update batches.
Code
function l10n_update_batch_import($updates, $import_mode) {
foreach ($updates as $update) {
$id = $update->filename;
$operations[] = array(
'_l10n_update_batch_import',
array(
$id,
$update,
$import_mode,
),
);
}
return _l10n_update_create_batch($operations);
}