You are here

protected function LocaleUpdateBase::setTranslationsDirectory in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Tests/LocaleUpdateBase.php \Drupal\locale\Tests\LocaleUpdateBase::setTranslationsDirectory()

Sets the value of the default translations directory.

Parameters

string $path: Path of the translations directory relative to the drupal installation directory.

1 call to LocaleUpdateBase::setTranslationsDirectory()
LocaleUpdateBase::setTranslationFiles in core/modules/locale/src/Tests/LocaleUpdateBase.php
Setup the environment containing local and remote translation files.

File

core/modules/locale/src/Tests/LocaleUpdateBase.php, line 80
Contains \Drupal\locale\Tests\LocaleUpdateBase.

Class

LocaleUpdateBase
Base class for testing updates to string translations.

Namespace

Drupal\locale\Tests

Code

protected function setTranslationsDirectory($path) {
  file_prepare_directory($path, FILE_CREATE_DIRECTORY);
  $this
    ->config('locale.settings')
    ->set('translation.path', $path)
    ->save();
}