public function getLocation($info)
    {
        $enableLanguageToCountryGuess = Config::getInstance()->Tracker['enable_language_to_country_guess'];

        if (empty($info['lang'])) {
            $info['lang'] = Common::getBrowserLanguage();
        }
        $country = Common::getCountry($info['lang'], $enableLanguageToCountryGuess, $info['ip']);

        $location = array(parent::COUNTRY_CODE_KEY => $country);
        $this->completeLocationResult($location);

        return $location;
    }
public function getLocation($info)
    {
        $enableLanguageToCountryGuess = Config::getInstance()->Tracker['enable_language_to_country_guess'];

        if (empty($info['lang'])) {
            $info['lang'] = Common::getBrowserLanguage();
        }
        $country = Common::getCountry($info['lang'], $enableLanguageToCountryGuess, $info['ip']);

        $location = array(parent::COUNTRY_CODE_KEY => $country);
        $this->completeLocationResult($location);

        return $location;
    }
public function getLocation ( $ info ) { $ enableLanguageToCountryGuess = Config :: getInstance ( ) -> Tracker [ 'enable_language_to_country_guess' ] ; if ( empty ( $ info [ 'lang' ] ) ) { $ info [ 'lang' ] = Common :: getBrowserLanguage ( ) ; } $ country = Common :: getCountry ( $ info [ 'lang' ] , $ enableLanguageToCountryGuess , $ info [ 'ip' ] ) ; $ location = array ( parent :: COUNTRY_CODE_KEY => $ country ) ; $ this -> completeLocationResult ( $ location ) ; return $ location ; }
Guesses a visitor's location using a visitor's browser language.

@param array $info Contains 'ip' & 'lang' keys.
@return array Contains the guessed country code mapped to LocationProvider::COUNTRY_CODE_KEY.
Guesses a visitor s location using a visitor s browser language .