Returns the visitor country based on the Browser 'accepted language'
information, but provides a hook for geolocation via IP address.
public static getCountry ( string $lang, boolean $enableLanguageToCountryGuess, string $ip ) : string | ||
$lang | string | browser lang |
$enableLanguageToCountryGuess | boolean | If set to true, some assumption will be made and detection guessed more often, but accuracy could be affected |
$ip | string | |
return | string | 2 letter ISO code |