3

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 2

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

1
  • 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.
    – Blissful
    Dec 6, 2018 at 16:19
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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