function TestSiteMultilingualInstallTestScript::preinstall

Same name in other branches
  1. 9 core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php \Drupal\TestSite\TestSiteMultilingualInstallTestScript::preinstall()
  2. 8.9.x core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php \Drupal\TestSite\TestSiteMultilingualInstallTestScript::preinstall()
  3. 10 core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php \Drupal\TestSite\TestSiteMultilingualInstallTestScript::preinstall()

Overrides TestPreinstallInterface::preinstall

File

core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php, line 19

Class

TestSiteMultilingualInstallTestScript
Setup file used by TestSiteApplicationTest.

Namespace

Drupal\TestSite

Code

public function preinstall($db_prefix, $site_directory) {
    // Place a custom local translation in the translations directory.
    mkdir($site_directory . '/files/translations', 0777, TRUE);
    file_put_contents($site_directory . '/files/translations/drupal-8.0.0.fr.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Enregistrer et continuer\"");
}

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