function LocaleController::checkTranslation
Same name in other branches
- 9 core/modules/locale/src/Controller/LocaleController.php \Drupal\locale\Controller\LocaleController::checkTranslation()
- 10 core/modules/locale/src/Controller/LocaleController.php \Drupal\locale\Controller\LocaleController::checkTranslation()
- 11.x core/modules/locale/src/Controller/LocaleController.php \Drupal\locale\Controller\LocaleController::checkTranslation()
Checks for translation updates and displays the translations status.
Manually checks the translation status without the use of cron.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirection to translations reports page.
1 string reference to 'LocaleController::checkTranslation'
- locale.routing.yml in core/
modules/ locale/ locale.routing.yml - core/modules/locale/locale.routing.yml
File
-
core/
modules/ locale/ src/ Controller/ LocaleController.php, line 20
Class
- LocaleController
- Return response for manual check translations.
Namespace
Drupal\locale\ControllerCode
public function checkTranslation() {
$this->moduleHandler()
->loadInclude('locale', 'inc', 'locale.compare');
// Check translation status of all translatable project in all languages.
// First we clear the cached list of projects. Although not strictly
// necessary, this is helpful in case the project list is out of sync.
locale_translation_flush_projects();
locale_translation_check_projects();
// Execute a batch if required. A batch is only used when remote files
// are checked.
if (batch_get()) {
return batch_process('admin/reports/translations');
}
return $this->redirect('locale.translate_status');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.