Aggiornamento ricerce OSM in italiano

This commit is contained in:
loviuz 2023-12-18 15:01:50 +01:00
parent 3501e0ffee
commit 6dffe7b481
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ switch (post('op')) {
// TODO: da riscrivere con Guzzle e spostare su hook
$ch = curl_init();
$url = 'https://nominatim.openstreetmap.org/search.php?q='.$indirizzo.'&format=jsonv2';
$url = 'https://nominatim.openstreetmap.org/search.php?q='.$indirizzo.'&format=jsonv2&accept-language='.$lang;
$user_agent = 'traccar';
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_URL, $url);

View File

@ -76,7 +76,7 @@ $("#modals > div").on("shown.bs.modal", function () {
function initGeocomplete() {
$.ajax({
url: "https://nominatim.openstreetmap.org/search.php?q=" + encodeURI(input("gaddress").get()) + "&format=jsonv2",
url: "https://nominatim.openstreetmap.org/search.php?q=" + encodeURI(input("gaddress").get()) + "&format=jsonv2&accept-language='.$lang.'",
type : "GET",
dataType: "JSON",
success: function(data){