src/Behat/Behat/Definition/Translator/DefinitionTranslator.php
public function translateDefinition(Suite $suite, Definition $definition, $language = null)
    {
        $assetsId = $suite->getName();
        $pattern = $definition->getPattern();

        $translatedPattern = $this->translator->trans($pattern, array(), $assetsId, $language);
        if ($pattern != $translatedPattern) {
            return new TranslatedDefinition($definition, $translatedPattern, $language);
        }

        return $definition;
    }
public function translateDefinition(Suite $suite, Definition $definition, $language = null)
    {
        $assetsId = $suite->getName();
        $pattern = $definition->getPattern();

        $translatedPattern = $this->translator->trans($pattern, array(), $assetsId, $language);
        if ($pattern != $translatedPattern) {
            return new TranslatedDefinition($definition, $translatedPattern, $language);
        }

        return $definition;
    }
public function translateDefinition ( Suite $ suite , Definition $ definition , $ language = null ) { $ assetsId = $ suite -> getName ( ) ; $ pattern = $ definition -> getPattern ( ) ; $ translatedPattern = $ this -> translator -> trans ( $ pattern , array ( ) , $ assetsId , $ language ) ; if ( $ pattern != $ translatedPattern ) { return new TranslatedDefinition ( $ definition , $ translatedPattern , $ language ) ; } return $ definition ; }
Attempts to translate definition using translator and produce translated one on success.

@param Suite       $suite
@param Definition  $definition
@param null|string $language

@return Definition|TranslatedDefinition
Attempts to translate definition using translator and produce translated one on success .