Bundle/CoreBundle/Twig/Extension/RoutingExtension.php
protected function getPrefix($locale)
    {
        foreach ($this->localeResolver->getDomainConfig() as $_domain => $_locale) {
            if ($_locale === $locale) {
                $urlPrefix = sprintf('%s://%s', $this->request ? $this->request->getScheme() : 'http', $_domain);
                if ($this->request && $this->request->getPort()) {
                    $urlPrefix .= ':'.$this->request->getPort();
                }

                return $urlPrefix;
            }
        }
    }
protected function getPrefix($locale)
    {
        foreach ($this->localeResolver->getDomainConfig() as $_domain => $_locale) {
            if ($_locale === $locale) {
                $urlPrefix = sprintf('%s://%s', $this->request ? $this->request->getScheme() : 'http', $_domain);
                if ($this->request && $this->request->getPort()) {
                    $urlPrefix .= ':'.$this->request->getPort();
                }

                return $urlPrefix;
            }
        }
    }
protected function getPrefix ( $ locale ) { foreach ( $ this -> localeResolver -> getDomainConfig ( ) as $ _domain => $ _locale ) { if ( $ _locale === $ locale ) { $ urlPrefix = sprintf ( '%s://%s' , $ this -> request ? $ this -> request -> getScheme ( ) : 'http' , $ _domain ) ; if ( $ this -> request && $ this -> request -> getPort ( ) ) { $ urlPrefix .= ':' . $ this -> request -> getPort ( ) ; } return $ urlPrefix ; } } }
If victoire_i18n.locale_pattern == domain, then we force the url rewrite with a valid host.

@param $locale

@return null
If victoire_i18n . locale_pattern == domain then we force the url rewrite with a valid host .