function LocaleTestTranslateHooks::modulesInstalled

Implements hook_modules_installed().

See also

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

File

core/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php, line 35

Class

LocaleTestTranslateHooks
Hook implementations for locale_test_translate.

Namespace

Drupal\locale_test_translate\Hook

Code

public function modulesInstalled($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.