Kdyby\Translation\Latte\TranslateMacros::install PHP Method

install() public static method

public static install ( Compiler $compiler )
$compiler Latte\Compiler
    public static function install(Compiler $compiler)
    {
        $me = new static($compiler);
        /** @var TranslateMacros $me */
        $me->addMacro('_', [$me, 'macroTranslate'], [$me, 'macroTranslate']);
        $me->addMacro('translator', [$me, 'macroDomain'], [$me, 'macroDomainEnd']);
        return $me;
    }