TranslationsStream::getName

public TranslationsStream::getName() Returns the name of the stream wrapper for use in the UI. Return value string The stream wrapper name. Overrides StreamWrapperInterface::getName File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 25 Class TranslationsStream Defines a Drupal translations (translations://) stream wrapper class. Namespace Drupal\locale\StreamWrapper Code public function getName() { return t('Translation files'); }

TranslationsStream::getExternalUrl

TranslationsStream::getExternalUrl() Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl(). Throws \LogicException PO files URL should not be public. Overrides StreamWrapperInterface::getExternalUrl File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 48 Class TranslationsStream Defines a Drupal translations (translations://) stream wrapper class. Namespace Drupal\locale\StreamWrapper Code function getExternalUrl() { throw new \LogicExcepti

TranslationsStream::getDirectoryPath

TranslationsStream::getDirectoryPath() Gets the path that the wrapper is responsible for. @todo Review this method name in D8 per https://www.drupal.org/node/701358. Return value string String specifying the path. Overrides LocalStream::getDirectoryPath File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 39 Class TranslationsStream Defines a Drupal translations (translations://) stream wrapper class. Namespace Drupal\locale\StreamWrapper Code function getDirectoryP

TranslationsStream::getDescription

public TranslationsStream::getDescription() Returns the description of the stream wrapper for use in the UI. Return value string The stream wrapper description. Overrides StreamWrapperInterface::getDescription File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 32 Class TranslationsStream Defines a Drupal translations (translations://) stream wrapper class. Namespace Drupal\locale\StreamWrapper Code public function getDescription() { return t('Translation files')

TranslationsStream

Defines a Drupal translations (translations://) stream wrapper class. Provides support for storing translation files. Hierarchy class \Drupal\Core\StreamWrapper\LocalStream implements StreamWrapperInterfaceclass \Drupal\locale\StreamWrapper\TranslationsStream File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 13 Namespace Drupal\locale\StreamWrapper Members Name Modifiers Type Description LocalStream::$context public property Stream context resource

TranslationManager::__construct

public TranslationManager::__construct(LanguageDefault $default_language) Constructs a TranslationManager object. Parameters \Drupal\Core\Language\LanguageDefault $default_language: The default language. File core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 52 Class TranslationManager Defines a chained translation implementation combining multiple translators. Namespace Drupal\Core\StringTranslation Code public function __construct(LanguageDefault $default_language)

TranslationManager::translate

public TranslationManager::translate($string, array $args = array(), array $options = array()) Translates a string to the current language or to a given language. Never call this translate() method directly. In order for strings to be localized, make them available in one of the ways supported by the Localization API. When possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait $this->t(). Otherwise create a new \Drupal\Core\StringTranslation\TranslatableMarkup object. Parame

TranslationManager::sortTranslators

protected TranslationManager::sortTranslators() Sorts translators according to priority. Return value \Drupal\Core\StringTranslation\Translator\TranslatorInterface[] A sorted array of translator objects. File core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 79 Class TranslationManager Defines a chained translation implementation combining multiple translators. Namespace Drupal\Core\StringTranslation Code protected function sortTranslators() { $sorted = array();

TranslationManager::setDefaultLangcode

public TranslationManager::setDefaultLangcode($langcode) Sets the default langcode. Parameters string $langcode: A language code. File core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 162 Class TranslationManager Defines a chained translation implementation combining multiple translators. Namespace Drupal\Core\StringTranslation Code public function setDefaultLangcode($langcode) { $this->defaultLangcode = $langcode; }

TranslationManager::reset

public TranslationManager::reset() Resets translation cache. Since most translation systems implement some form of caching, this provides a way to delete that cache. Overrides TranslatorInterface::reset File core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 169 Class TranslationManager Defines a chained translation implementation combining multiple translators. Namespace Drupal\Core\StringTranslation Code public function reset() { if ($this->sortedTranslators ===