public function isTranslable()
    {
        if ($this->getPath() === null) {
            $this->detectUrlDetails();
        }

        foreach ($this->config->getExcludedUrls() as $regex) {
            $escapedRegex = Text::escapeForRegex(Text::fullTrim($regex));
            $fullRegex = sprintf('/%s/', $escapedRegex);

            if (preg_match($fullRegex, $this->getPath()) === 1) {
                return false;
            }
        }

        return true;
    }
public function isTranslable()
    {
        if ($this->getPath() === null) {
            $this->detectUrlDetails();
        }

        foreach ($this->config->getExcludedUrls() as $regex) {
            $escapedRegex = Text::escapeForRegex(Text::fullTrim($regex));
            $fullRegex = sprintf('/%s/', $escapedRegex);

            if (preg_match($fullRegex, $this->getPath()) === 1) {
                return false;
            }
        }

        return true;
    }
public function isTranslable ( ) { if ( $ this -> getPath ( ) === null ) { $ this -> detectUrlDetails ( ) ; } foreach ( $ this -> config -> getExcludedUrls ( ) as $ regex ) { $ escapedRegex = Text :: escapeForRegex ( Text :: fullTrim ( $ regex ) ) ; $ fullRegex = sprintf ( '/%s/' , $ escapedRegex ) ; if ( preg_match ( $ fullRegex , $ this -> getPath ( ) ) === 1 ) { return false ; } } return true ; }
Check if we need to translate given URL

@return bool
Check if we need to translate given URL