GeoDB Cities

FREEMIUM
Verified
By Michael Mogley | Updated 14 days ago | Data
Popularity

9.9 / 10

Latency

62ms

Service Level

100%

Health Check

100%

Back to All Discussions

GeoDB Cities - how to get the right language

Rapid account: D Suppo
DSuppo
5 years ago

Hello, I’m requesting cities with JS with this code:

xhr.open(“GET”, “https://wft-geo-db.p.rapidapi.com/v1/geo/locations/%2B” + latitude + “%2B”

  • longitude + “/nearbyCities?limit=10&languageCode=it&minPopulation=” + minPopulation + “&radius=” + radius);

As you can see " languageCode=it "
but I get the city names in english.
How to get them in italian?
Thank-you

Daniele

Rapid account: Wirefreethought
wirefreethought Commented 4 years ago

This should now be fixed. Try GET /v1/geo/locations/45.46427%252B9.18951/nearbyCities?minPopulation=10000&radius=100&languageCode=it

Rapid account: Wirefreethought
wirefreethought Commented 4 years ago

Another update: The installation of the internal Wikidata instance is going to take another week or so, as I had to order a bigger SSD to accommodate the database. Thanks for your patience. Stay tuned.

Rapid account: Wirefreethought
wirefreethought Commented 4 years ago

Just an update on this. The kind of Wikidata extraction I’ll need to do to support cases like this cannot be efficiently done through the publicly-available Wikidata instance. To get around this, I am currently working on setting up an internal instance. This may take a couple more weeks before I can procure the hardware, set it up, and update the import code to leverage it. Stay tuned to this thread.

Rapid account: Wirefreethought
wirefreethought Commented 4 years ago

Thanks for your report. The problem is that the Wikidata entry uses a Geonames ID that’s tied to what GeoNames considers a third-order administrative division (ADM3). GeoDB doesn’t currently pull ADM3 data from Geonames. Hence the disconnect. I will have a look over the next few days to see how to address this situation with minimal impact to existing data.

Rapid account: Dlazzarino
dlazzarino Commented 4 years ago

Hi support,
the same problem for me. I have tried this request:

var req = unirest(“GET”, “https://wft-geo-db.p.rapidapi.com/v1/geo/cities”);

req.query({
“countryIds”: “IT”,
“namePrefix”: “MIL”,
“sort”: “-population”,
“languageCode”: “IT”
});

I want my result in Italian language but the service responds with the English one.
This is a big city and I also found the translation on Wikidata, see -> https://www.wikidata.org/wiki/Q490

What’s wrong?

Thank you,
Diego

Rapid account: Wirefreethought
wirefreethought Commented 5 years ago

Keep in mind that translations are provided where available. This is based on WIkidata translations for the city in question. Smaller cities are not likely to have a translation in your requested language. If you think a given city is missing a translation that’s actually listed in Wikidata, please verify this first by going to the Wikidata entry using the provided Q identifier and observe if Italian is listed as a translation. If this is the case, definitely bring it to my attention.

Rapid account: Wirefreethought
wirefreethought Commented 5 years ago

Can you provide the specific latitude/longitude coordinates, minPopulation, and radius you’re using?

Join in the discussion - add comment below:

Login / Signup to post new comments