[openstreetmap/openstreetmap-website] Support localization for Mapzen routing directions (#1219)

Petr Kadlec notifications at github.com
Wed May 18 10:57:17 UTC 2016


Whoa, interesting! When I tested the API, it seemed Mapzen supports the localization correctly now.

However, per [their API documentation](https://mapzen.com/documentation/turn-by-turn/api-reference/#directions-options), you should pass e.g. `cs-CZ` instead of `cs` (which is what `I18n.currentLocale()` returns, IIANM). In the latter case, the default en-US localization is used. And this is what I am seeing when testing it now live, so, IIANM, the remapping would be required anyway (also, cf. [`mapquest.js`](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/assets/javascripts/index/directions/mapquest.js#L45)).

Check for yourself: [`cs`](https://valhalla.mapzen.com/route?api_key=valhalla-7UikjOk&json={%22locations%22%3A[{%22lat%22%3A50.1055%2C%22lon%22%3A14.568}%2C{%22lat%22%3A50.1016%2C%22lon%22%3A14.5563}]%2C%22costing%22%3A%22auto%22%2C%22directions_options%22%3A{%22units%22%3A%22km%22%2C%22language%22%3A%22cs%22}}), [`cs-CZ`](https://valhalla.mapzen.com/route?api_key=valhalla-7UikjOk&json={%22locations%22%3A[{%22lat%22%3A50.1055%2C%22lon%22%3A14.568}%2C{%22lat%22%3A50.1016%2C%22lon%22%3A14.5563}]%2C%22costing%22%3A%22auto%22%2C%22directions_options%22%3A{%22units%22%3A%22km%22%2C%22language%22%3A%22cs-CZ%22}})

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1219#issuecomment-219992851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160518/8244731f/attachment.html>


More information about the rails-dev mailing list