Had a similar problem, only in other languages. The solution was this:
1. by IP know the longitude and width
2. Through the services of google, etc. For geo-data looking for the name of the area in the selected languages.
It was only a server-based solution.
By the way, is not very clear why you learn the info about the IP via Ajax. If we determine the city of the current user, you can use the geolocation api coordinates he gives. If it is necessary to determine the status of the IP address, it is easier to do where the IP address is determined, i.e. on the server side. Even nginx has the extension of ip to geo machine. Think about architecture, you may prefer to do things differently.