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