From b03ff4f148eb56e4114f7647166eeca8b283b627 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 26 Jul 2024 16:03:49 +0200 Subject: [PATCH] Actually use the current language in search --- src/Logic/Osm/Geocoding.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Logic/Osm/Geocoding.ts b/src/Logic/Osm/Geocoding.ts index 68bb1bc96..668b503f8 100644 --- a/src/Logic/Osm/Geocoding.ts +++ b/src/Logic/Osm/Geocoding.ts @@ -2,6 +2,7 @@ import { Utils } from "../../Utils" import { BBox } from "../BBox" import Constants from "../../Models/Constants" import { FeatureCollection } from "geojson" +import Locale from "../../UI/i18n/Locale" export interface GeoCodeResult { display_name: string @@ -23,7 +24,7 @@ export class Geocoding { const b = bbox ?? BBox.global const url = `${ Geocoding.host - }search?format=json&limit=1&viewbox=${b.getEast()},${b.getNorth()},${b.getWest()},${b.getSouth()}&accept-language=nl&q=${query}` + }search?format=json&limit=1&viewbox=${b.getEast()},${b.getNorth()},${b.getWest()},${b.getSouth()}&accept-language=${Locale.language.data}&q=${query}` return Utils.downloadJson(url) }