src/Sulu/Component/Webspace/Url.php
public function isValidLocale($language, $country)
    {
        return ($this->getLanguage() === $language && $this->getCountry() === $country)
            || (empty($this->getLanguage()) && empty($this->getCountry()));
    }
public function isValidLocale($language, $country)
    {
        return ($this->getLanguage() === $language && $this->getCountry() === $country)
            || (empty($this->getLanguage()) && empty($this->getCountry()));
    }
public function isValidLocale ( $ language , $ country ) { return ( $ this -> getLanguage ( ) === $ language && $ this -> getCountry ( ) === $ country ) || ( empty ( $ this -> getLanguage ( ) ) && empty ( $ this -> getCountry ( ) ) ) ; }
Checks if this URL handles the locale for the given language and country.

@param string $language
@param string $country

@return bool
Checks if this URL handles the locale for the given language and country .