How does Shopify localization detect a customer's country?

Hi, I am trying to add additional information form on cart page for customer from some country. In Shopify we can detect customer countr using localizaton as

{% if localization.country.iso_code == ‘FR’ %}> > // show custom content only meant for France> > {% else %}> > show generic content> > {% endif %}

My question is how localization.country detect customer country? Can this detect customer country even if they do not log in to our shopify store?