Finishes importing files at end of installation.
If other projects besides Drupal core have been installed, their translation will be imported here.
$install_state: An array of information about the current installation state.
The batch definition, if there are language files to import.
function install_import_translations_remaining(&$install_state) {
module_load_include('fetch.inc', 'locale');
module_load_include('compare.inc', 'locale');
// Build a fresh list of installed projects. When more projects than core are
// installed, their translations will be downloaded (if required) and imported
// using a batch.
$projects = locale_translation_build_projects();
if (count($projects) > 1) {
$options = _locale_translation_default_update_options();
if ($batch = locale_translation_batch_update_build(array(), array(
$install_state['parameters']['langcode'],
), $options)) {
return $batch;
}
}
}