diff --git a/middleware/localNamingConventions.js b/middleware/localNamingConventions.js index 6170cda2..bd158639 100644 --- a/middleware/localNamingConventions.js +++ b/middleware/localNamingConventions.js @@ -1,5 +1,20 @@ +var check = require('check-types'); + +var flipNumberAndStreetCountries = ['DEU', 'FIN', 'SWE', 'NOR', 'DNK', 'ISL']; function setup() { + var api = require('pelias-config').generate().api; + var settings = api.localization; + if (settings && settings.flipNumberAndStreetCountries) { + var countries = settings.flipNumberAndStreetCountries; + for (var i=0; i 'Grolmanstraße 101' function flipNumberAndStreet(place) { var standard = ( place.address.number + ' ' + place.address.street ),