+ var expiry = new Date();
+ expiry.setYear(expiry.getFullYear() + 10);
+
+ var engines = OSM.Directions.engines;
+
+ engines.sort(function (a, b) {
+ var localised_a = I18n.t("javascripts.directions.engines." + a.id),
+ localised_b = I18n.t("javascripts.directions.engines." + b.id);
+ return localised_a.localeCompare(localised_b);
+ });
+
+ var select = $("select.routing_engines");
+
+ engines.forEach(function (engine, i) {
+ select.append("<option value='" + i + "'>" + I18n.t("javascripts.directions.engines." + engine.id) + "</option>");
+ });
+