core-bundle/src/EventListener/InsertTags/TranslationListener.php
public function onReplaceInsertTags(string $tag)
    {
        $chunks = explode('::', $tag);

        if ('trans' !== $chunks[0]) {
            return false;
        }

        $parameters = isset($chunks[3]) ? explode(':', $chunks[3]) : [];

        return $this->translator->trans($chunks[1], $parameters, $chunks[2] ?? null);
    }
public function onReplaceInsertTags(string $tag)
    {
        $chunks = explode('::', $tag);

        if ('trans' !== $chunks[0]) {
            return false;
        }

        $parameters = isset($chunks[3]) ? explode(':', $chunks[3]) : [];

        return $this->translator->trans($chunks[1], $parameters, $chunks[2] ?? null);
    }
public function onReplaceInsertTags ( string $ tag ) { $ chunks = explode ( '::' , $ tag ) ; if ( 'trans' !== $ chunks [ 0 ] ) { return false ; } $ parameters = isset ( $ chunks [ 3 ] ) ? explode ( ':' , $ chunks [ 3 ] ) : [ ] ; return $ this -> translator -> trans ( $ chunks [ 1 ] , $ parameters , $ chunks [ 2 ] ?? null ) ; }
Replaces the "trans" insert tag.

@return string|false
Replaces the trans insert tag .