Translator::addLoader()

addLoader(string $format, LoaderInterface $loader) Adds a Loader. Parameters string $format The name of the loader (see addResource()) LoaderInterface $loader A LoaderInterface instance

Translator::addPseudoClass()

XPathExpr addPseudoClass(XPathExpr $xpath, string $pseudoClass) Parameters XPathExpr $xpath string $pseudoClass Return Value XPathExpr Exceptions ExpressionErrorException

Translator::addResource()

addResource(string $format, mixed $resource, string $locale, string $domain = null) Adds a Resource. Parameters string $format The name of the loader (see addLoader()) mixed $resource The resource name string $locale The locale string $domain The domain Exceptions InvalidArgumentException If the locale contains invalid characters

Translator::addCombination()

XPathExpr addCombination(string $combiner, NodeInterface $xpath, NodeInterface $combinedXpath) Parameters string $combiner NodeInterface $xpath NodeInterface $combinedXpath Return Value XPathExpr Exceptions ExpressionErrorException

Translator

class Translator implements TranslatorInterface, TranslatorBagInterface Translator. Methods __construct(string $locale, MessageSelector $selector = null, string|null $cacheDir = null, bool $debug = false) Constructor. setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) Sets the ConfigCache factory to use. addLoader(string $format, LoaderInterface $loader) Adds a Loader. addResource(string $format, mixed $resource, string $locale, string $domain = null) A

Translator::addAttributeMatching()

XPathExpr addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, string $value) Parameters XPathExpr $xpath string $operator string $attribute string $value Return Value XPathExpr Exceptions ExpressionErrorException

Translator::addFunction()

XPathExpr addFunction(XPathExpr $xpath, FunctionNode $function) Parameters XPathExpr $xpath FunctionNode $function Return Value XPathExpr Exceptions ExpressionErrorException

Translator

class Translator implements TranslatorInterface XPath expression translator interface. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect. Methods __construct(ParserInterface $parser = null) static string getXpathLiteral(string $element) string cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::') Translates a CSS selector to an XPath expression. string selectorToXPath(Selec

Translator

class Translator extends Translator implements WarmableInterface Translator. Methods __construct(ContainerInterface $container, MessageSelector $selector, array $loaderIds = array(), array $options = array()) Constructor. setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) Sets the ConfigCache factory to use. from Translator addLoader(string $format, LoaderInterface $loader) Adds a Loader. from Translator addResource(string $format, mixed $resource, string

TranslationWriter::writeTranslations()

writeTranslations(MessageCatalogue $catalogue, string $format, array $options = array()) Writes translation from the catalogue according to the selected format. Parameters MessageCatalogue $catalogue The message catalogue to dump string $format The format to use to dump the messages array $options Options that are passed to the dumper Exceptions InvalidArgumentException