Author |
Message |
14/04/2011 19:40:42
|
Sergillop
Joined: 14/04/2011 19:38:37
Messages: 3
Offline
|
For instance, how to get "España", when you have name "Spain" and country code "ES"?
|
|
|
15/04/2011 04:23:47
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
http://api.geonames.org/search?q=spain&maxRows=10&lang=es&username=demo&featureCode=PCLI&country=es
The translated name is in the element 'name'
Marc
|
|
|
|
15/04/2011 09:41:09
|
Sergillop
Joined: 14/04/2011 19:38:37
Messages: 3
Offline
|
Thanks for your reply Marc.
I'm a bit confused.. this is what I have in the mysql table geonames, for the geonameid in your link:
geonameid 2510769
name Kingdom of Spain
asciiname Kingdom of Spain
alternatenames An Spainn,An Spàinn,An Spáinn,Caxtillan,Caxtillān,...
latitude 40.0000000
longitude -4.0000000
fclass A
fcode PCLI
country ES
cc2
admin1 00
admin2
admin3
admin4
population 46505963
elevation 0
gtopo30 532
timezone Europe/Madrid
moddate 2010-09-16
And in countryInfo for ES:
iso_alpha2 ES
iso_alpha3 ESP
iso_numeric 724
fips_code SP
name Spain
capital Madrid
areainsqkm 504782
population 46505963
continent EU
tld NULL
currency EUR
currencyName NULL
Phone NULL
postalCodeFormat NULL
postalCodeRegex NULL
geonameId 0
languages .es
neighbours NULL
equivalentFipsCode NULL
It differs from the information in your link, did I import the wrong files?
|
|
|
15/04/2011 14:36:12
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
The translations to other languages are in the file 'alternatenames.zip'.
Marc
|
|
|
|
15/04/2011 14:44:24
|
Sergillop
Joined: 14/04/2011 19:38:37
Messages: 3
Offline
|
marc wrote:
The translations to other languages are in the file 'alternatenames.zip'.
Marc
Ok... I guess the problem is that I imported the alternatename1000.txt, and alternate names for countries are probably not there...
Sorry about the newbie questions and thanks again :>
|
|
|
|