Country detection via language: How does it work?

In its easiest form, Piwik uses the browser language to detect the country where the user is located. I am wondering how exactly this mechanism works. Is it using the HTTP Accept-Language header, or does the JavaScript code send the language based on the navigator object’s language properties?

In case someone finds the post:

https://github.com/matomo-org/matomo/issues/9251#issuecomment-377260920

1 Like

Thanks for the info and linking the Github issue! :slight_smile: