src/Sulu/Component/CustomUrl/Generator/Generator.php
protected function localizeDomain($domain, Localization $locale)
    {
        if (!$this->urlReplacer->hasLocalizationReplacer($domain)
            && !$this->urlReplacer->hasLanguageReplacer($domain)
        ) {
            $domain = $this->urlReplacer->appendLocalizationReplacer($domain);
        }

        $domain = $this->urlReplacer->replaceLanguage($domain, $locale->getLanguage());
        $domain = $this->urlReplacer->replaceCountry($domain, $locale->getCountry());
        $domain = $this->urlReplacer->replaceLocalization($domain, $locale->getLocale());

        return $this->urlReplacer->cleanup($domain);
    }
protected function localizeDomain($domain, Localization $locale)
    {
        if (!$this->urlReplacer->hasLocalizationReplacer($domain)
            && !$this->urlReplacer->hasLanguageReplacer($domain)
        ) {
            $domain = $this->urlReplacer->appendLocalizationReplacer($domain);
        }

        $domain = $this->urlReplacer->replaceLanguage($domain, $locale->getLanguage());
        $domain = $this->urlReplacer->replaceCountry($domain, $locale->getCountry());
        $domain = $this->urlReplacer->replaceLocalization($domain, $locale->getLocale());

        return $this->urlReplacer->cleanup($domain);
    }
protected function localizeDomain ( $ domain , Localization $ locale ) { if ( ! $ this -> urlReplacer -> hasLocalizationReplacer ( $ domain ) && ! $ this -> urlReplacer -> hasLanguageReplacer ( $ domain ) ) { $ domain = $ this -> urlReplacer -> appendLocalizationReplacer ( $ domain ) ; } $ domain = $ this -> urlReplacer -> replaceLanguage ( $ domain , $ locale -> getLanguage ( ) ) ; $ domain = $ this -> urlReplacer -> replaceCountry ( $ domain , $ locale -> getCountry ( ) ) ; $ domain = $ this -> urlReplacer -> replaceLocalization ( $ domain , $ locale -> getLocale ( ) ) ; return $ this -> urlReplacer -> cleanup ( $ domain ) ; }
Localize given domain.

@param string $domain
@param Localization $locale

@return string
Localize given domain .