function locale_cron

locale_cron()

Implements hook_cron().

See also

\Drupal\locale\Plugin\QueueWorker\LocaleTranslation

File

core/modules/locale/locale.module, line 353
Enables the translation of the user interface to languages other than English.

Code

function locale_cron() {
  // Update translations only when an update frequency was set by the admin
  // and a translatable language was set.
  // Update tasks are added to the queue here but processed by Drupal's cron.
  if ($frequency = \Drupal::config('locale.settings')->get('translation.update_interval_days') && locale_translatable_language_list()) {
    module_load_include('translation.inc', 'locale');
    locale_cron_fill_queue();
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.module/function/locale_cron/8.1.x