]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/cloudmade_foot.js
Make more of the javascript routing functions internationalizable
[rails.git] / app / assets / javascripts / routing_engines / cloudmade_foot.js
index 5193c647245067b5a51dca4f62bf476b7d6bcc57..5c1ba0e9716ab1088042640fab5f7470230a7a90 100644 (file)
@@ -4,7 +4,7 @@
 // http://cloudmade.com/documentation/routing
 
 OSM.RoutingEngines.list.push({
-       name: 'Foot (CloudMade)',
+       name: "javascripts.directions.engines.cloudmade_foot",
        draggable: false,
        CM_SPRITE_MAP: {
                "C": 1,
@@ -25,7 +25,8 @@ OSM.RoutingEngines.list.push({
                }
                url+=p.join(',');
                url+="/foot.js";
-               this.requestJSONP(url+"?callback=");
+        url+="?lang=" + I18n.currentLocale();
+               this.requestJSONP(url+"&callback=");
        },
        gotRoute: function(router,data) {
                router.setPolyline(data.route_geometry);