function locale_system_update

Same name in other branches
  1. 9 core/modules/locale/locale.module \locale_system_update()
  2. 8.9.x core/modules/locale/locale.module \locale_system_update()
  3. 10 core/modules/locale/locale.module \locale_system_update()
  4. 11.x core/modules/locale/locale.module \locale_system_update()

Imports translations when new modules or themes are installed.

This function will either import translation for the component change right away, or start a batch if more files need to be imported.

Parameters

$components: An array of component (theme and/or module) names to import translations for.

2 calls to locale_system_update()
locale_modules_installed in modules/locale/locale.module
Implements hook_modules_installed().
locale_themes_enabled in modules/locale/locale.module
Implements hook_themes_enabled().

File

modules/locale/locale.module, line 888

Code

function locale_system_update($components) {
    include_once DRUPAL_ROOT . '/includes/locale.inc';
    if ($batch = locale_batch_by_component($components)) {
        batch_set($batch);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.