Closed (fixed)
Project:
GeoNames
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2010 at 10:03 UTC
Updated:
20 Jan 2010 at 13:33 UTC
hi there, i've got a question on geonames (i think it belongs here). i use it together with gmaps to apply addresses and/or lon/lat to nodes. when using the fulltext-search to find a place, the service does find german spelled places like "konstanz" easily but then the result is always displayed in englisch ("Constance, Germany"). could it be somehow achieved to display results in different languages?
Comments
Comment #1
thommyboy commentedsearch on http://www.geonames.org itself does display the results in german...
Comment #2
lyricnz commentedI don't know how your module uses the this module, but the geonames module simply wraps results returned by the geonames.org webservices. By default, in the case of search:
We just get back structured data straight for the service:
According to the geonames documentation for the "search" service at http://www.geonames.org/export/geonames-search.html - you can pass a language parameter:
lang
string ISO-636 2-letter language code; en,de,fr,it,es,... (optional)
place name and country name will be returned in the specified language. Default is English. Feature classes and codes are only available in English and Bulgarian. Any help in translating is welcome.
So using PHP like:
I this case, the result is exactly the same as above. Perhaps your integration is using the "get" service to get more information about the results? Again, you can use that with the "lang" parameter:
delivering a result like:
Hope this helps. If it does, please close this issue.
Comment #3
thommyboy commentedhi lyricnz,
thanks for your quick answer! so this would be exactly what i would like to get as a result but in my configuration i input "konstanz" and the result is "constance" so I get everything in english. so you think it's an issue for drupal.org/project/gmaps where they use it- maybe they don't pass the $lang? found another issue there that seems to be a duplicate http://drupal.org/node/346413. thanks tom