0

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?

0

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();
  }
}
-1

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. – Marko Blazekovic Dec 6 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.