0
kicks
C# Auto Detect Preferred Country
I found that IP to Country has not been that best practices in locating that visitor preferred country, mostly because of IP are allocated to ISP in there registered country, but where the actual user with that assign IP address can be anywhere (also the VPN). Therefore a better way to detect that website visitor is to check their actual browser preferred language and country, this is done by the Request.UserLanguages in C#, but due to that this property return with a array of language that the visitor browser is set to, therefore not just one country is return. So I would need way to query this array and return only the country short code.