tripit / api

TripIt's API Documentation and Support Forum
http://www.tripit.com/developer
Other
47 stars 16 forks source link

Places normalized to English #198

Closed Amantel closed 7 years ago

Amantel commented 7 years ago

Hello!

Is there a way to get primary address in English?

For example, for the city of Malmo I get address:"Malmoe, Sweden" city:"Malmo" country:"SE" latitude:"55.600000" longitude:"13.000000" state:"Skåne" zip:"200 01"

I need to get state as "Skane" to pass to some other API's. Is there a string I can put in my request to get in English?

hliss commented 7 years ago

Hi @Amantel, great question! We currently do not localize or translate any address components. What you see is exactly what we were able to extract from a confirmation email or what was posted to our API (and geolocation extensions such as the "state"), and data therein can contain Unicode.

You should be able to find libraries in your programming language of choice to normalize Unicode strings to ASCII; they appear to implement methods defined by the Unicode Consortium here: http://unicode.org/reports/tr15/ (this may be more information than you want!). Hope that helps!