I have large site with 15 languages, when working locally If I enable some module over UI (or reinstall it) auto update of translations kicks off and this last for some time. I really don't need that while developing things, how could I disable this feature?
2 Answers
you can configure the translation.import_enabled key in locale.settings config a way to do that is with drush :
drush cset locale.settings translation.import_enabled 0
hope this helps
-
Did that, didn't help. I installed some module for testing and again "Updating configuration translations" started and I need to wait for that to finish.– BlissfulDec 6, 2018 at 16:19
I was able to disable update by:
<?php
/**
* Implements hook_module_implements_alter().
*/
function MY_MODULE_module_implements_alter(&$implementations, $hook) {
if ($hook == 'modules_installed') {
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler->moduleExists('locale')) {
unset($implementations['locale']);
}
}
}
/**
* Implements hook_modules_installed().
*/
function MY_MODULE_modules_installed() {
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler->moduleExists('locale')) {
locale_system_set_config_langcodes();
}
}