Translator::setConfigCacheFactory()

setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) Sets the ConfigCache factory to use. Parameters ConfigCacheFactoryInterface $configCacheFactory

Translator::registerParserShortcut()

Translator registerParserShortcut(ParserInterface $shortcut) Registers a shortcut parser. Parameters ParserInterface $shortcut Return Value Translator

Translator::selectorToXPath()

string selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::') Translates a parsed selector node to an XPath expression. Parameters SelectorNode $selector string $prefix Return Value string

Translator::getFallbackLocales()

array getFallbackLocales() Gets the fallback locales. Return Value array $locales The fallback locales

Translator::getLocale()

string getLocale() Returns the current locale. Return Value string The locale

Translator::getXpathLiteral()

static string getXpathLiteral(string $element) Parameters string $element Return Value string

Translator::getExtension()

ExtensionInterface getExtension(string $name) Parameters string $name Return Value ExtensionInterface Exceptions ExpressionErrorException

Translator::nodeToXPath()

XPathExpr nodeToXPath(NodeInterface $node) Parameters NodeInterface $node Return Value XPathExpr Exceptions ExpressionErrorException

Translator::cssToXPath()

string cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::') Translates a CSS selector to an XPath expression. Parameters string $cssExpr string $prefix Return Value string

Translator::getCatalogue()

MessageCatalogueInterface getCatalogue(string|null $locale = null) Gets the catalogue by locale. Parameters string|null $locale The locale or null to use the default Return Value MessageCatalogueInterface Exceptions InvalidArgumentException If the locale contains invalid characters