function ConfigTranslationInstallTest::setUpLanguage

Same name in other branches
  1. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::setUpLanguage()
  2. 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::setUpLanguage()
  3. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationInstallTest::setUpLanguage()

Overrides InstallerTestBase::setUpLanguage

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php, line 32

Class

ConfigTranslationInstallTest
Installs the config translation module on a site installed in non english.

Namespace

Drupal\Tests\config_translation\Functional

Code

protected function setUpLanguage() : void {
    // Place custom local translations in the translations directory.
    mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.eo.po', $this->getPo('eo'));
    parent::setUpLanguage();
    $this->translations['Save and continue'] = 'Save and continue eo';
}

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