N
N
niko832011-11-29 12:51:56
API
niko83, 2011-11-29 12:51:56

Determine the location by IP with translation into the desired language?

I have the user's IP, using geoip I get the country, city, and so on. but only in English .
Example:

'{"city": "Beijing", "region_name": "22", "time_zone": "Asia/Harbin", "longitude": "116.38830000000002", "metro_code": "", "country_code3": "CHN", "latitude": "39.928899999999999", "postal_code": "", "country_code": "CN", "country_name": "China"}'

I need the names of these localities in other languages ​​(depending on the current language on the site).
Is there a geoip service that supports localization ???
Should I use services like Google Translate code.google.com/apis/language/translate/v2/getting... ???
UPD: Solution found. Alternatively, you can use gettext, it remains to find the localization *.po files. The first 30 minutes of searching yielded no results. Does anyone have a direct link to this stuff ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eddy_Em, 2011-11-29
@niko83

Download localization files:
localize.drupal.org/translate/downloads?project=context_geoip
And use gettext

S
switlle, 2011-12-03
@switlle

I highly recommend the
www.wipmania.com
project Unlike various databases that provide location information based on official registration documents of the owner's company, this project gives real and 99.99% accurate data.

F
FORTIS, 2013-01-23
@FORTIS

if we are talking about MaxMind GeoIP, then they have localizations dev.maxmind.com/faq/geoip#localized_cities

S
sdevalex, 2011-11-29
@sdevalex

Do you need it on the server or client side? If on the client side, the Google API has everything you need for translation and language detection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question