Get localisation of a client with the localization.country.iso_code object

Hi,

I currently have the markets option enabled in my shop, so I am using the localization.country.iso_code object to get the iso code of where the customer is connecting to, so I can redirect him to the corresponding market if necessary. Under the same shop I have several specific markets with their respective URLS.

The problem is that the object always throws me ES (I live in Spain) even if I connect with a VPN from anywhere in the world, so I would like to know how to make this functionality correctly.

Does this object return the ISO code of where the client is connecting to? If not, how can I get it?

Thanks!