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::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::getType

public static TranslationsStream::getType() Returns the type of stream wrapper. Return value int Overrides LocalStream::getType File core/modules/locale/src/StreamWrapper/TranslationsStream.php, line 18 Class TranslationsStream Defines a Drupal translations (translations://) stream wrapper class. Namespace Drupal\locale\StreamWrapper Code public static function getType() { return StreamWrapperInterface::LOCAL_HIDDEN; }

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

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::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 ===

TranslationManager::getStringTranslation

public TranslationManager::getStringTranslation($langcode, $string, $context) Retrieves English string to given language. Parameters string $langcode: Language code to translate to. string $string: The source string. string $context: The string context. Return value string|false Translated string if there is a translation, FALSE if not. Overrides TranslatorInterface::getStringTranslation File core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 92 Class TranslationManager

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