public function FileTranslation::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php \Drupal\Core\StringTranslation\Translator\FileTranslation::__construct()
- 9 core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php \Drupal\Core\StringTranslation\Translator\FileTranslation::__construct()
Constructs a StaticTranslation object.
Parameters
string $directory: The directory to retrieve file translations from.
\Drupal\Core\File\FileSystemInterface $file_system: The file system service.
Overrides StaticTranslation::__construct
File
- core/
lib/ Drupal/ Core/ StringTranslation/ Translator/ FileTranslation.php, line 42
Class
- FileTranslation
- File based string translation.
Namespace
Drupal\Core\StringTranslation\TranslatorCode
public function __construct($directory, FileSystemInterface $file_system) {
parent::__construct();
$this->directory = $directory;
$this->fileSystem = $file_system;
}