class FileTranslation

File based string translation.

Translates a string when some systems are not available.

Used during the install process, when database, theme, and localization system is possibly not yet available.

Hierarchy

File

core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php, line 16

Namespace

Drupal\Core\StringTranslation\Translator

Members

Name Modifiers Type Description
FileTranslation::$directory protected property Directory to find translation files in the file system.
FileTranslation::filesToArray public static function Reads the given Gettext PO files into a data structure.
FileTranslation::findTranslationFiles public function Finds installer translations either for a specific or all languages.
FileTranslation::getLanguage protected function Retrieves translations for a given language. Overrides StaticTranslation::getLanguage
FileTranslation::getTranslationFilesPattern protected function Provides translation file name pattern.
FileTranslation::__construct public function Constructs a StaticTranslation object. Overrides StaticTranslation::__construct
StaticTranslation::$translations protected property String translations
StaticTranslation::getStringTranslation public function Retrieves English string to given language. Overrides TranslatorInterface::getStringTranslation
StaticTranslation::reset public function Resets translation cache. Overrides TranslatorInterface::reset

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!Translator!FileTranslation.php/class/FileTranslation/8.1.x