function locale_test_translate_modules_installed

Same name and namespace in other branches
  1. 9 core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module \locale_test_translate_modules_installed()
  2. 10 core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module \locale_test_translate_modules_installed()

Implements hook_modules_installed().

See also

\Drupal\Tests\locale\Functional\LocaleConfigTranslationImportTest::testConfigTranslationWithForeignLanguageDefault

File

core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module, line 29

Code

function locale_test_translate_modules_installed($modules, $is_syncing) {
    // Ensure that writing to configuration during install does not cause
    // \Drupal\locale\LocaleConfigSubscriber to create incorrect translations due
    // the configuration langcode and data being out-of-sync.
    \Drupal::configFactory()->getEditable('locale_test_translate.settings')
        ->set('key_set_during_install', TRUE)
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.