protected function LocaleUpdateBase::setTranslationsDirectory in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setTranslationsDirectory()
- 9 core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setTranslationsDirectory()
Sets the value of the default translations directory.
Parameters
string $path: Path of the translations directory relative to the drupal installation directory.
File
- core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateBase.php, line 79
Class
- LocaleUpdateBase
- Base class for testing updates to string translations.
Namespace
Drupal\Tests\locale\FunctionalCode
protected function setTranslationsDirectory($path) {
\Drupal::service('file_system')
->prepareDirectory($path, FileSystemInterface::CREATE_DIRECTORY);
$this
->config('locale.settings')
->set('translation.path', $path)
->save();
}