function 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/ tests/ src/ Functional/ LocaleUpdateBase.php  - Setup the environment containing local and remote translation files.
 
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.