The 'data' comes from the server so it could only tell you where the server is, while you want to display content according to the location of the client...
What you have to understand first of all, is that the actual location of the client may never be revealed...
There are two problems:
1. Privacy...the end user have all the right not let you know where he is
2. For devices (like desktop PC) without GPS the location decided based on IP address, which in almost every case the location of the ISP's computer farm...
In any case there is an API called Geolocation that supported by most of the modern browsers (as part of HTML5 support), you should use it:
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation[
^]