aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/geocoder/OpenCageGeocoder.java')
-rw-r--r--src/main/java/org/traccar/geocoder/OpenCageGeocoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java b/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java
index 18cf3a715..c4a82b03c 100644
--- a/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java
+++ b/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java
@@ -26,10 +26,10 @@ public class OpenCageGeocoder extends JsonGeocoder {
url = "https://api.opencagedata.com/geocode/v1";
}
url += "/json?q=%f,%f&no_annotations=1&key=" + key;
- if (language != null) {
- url += "&language=" + language;
- } else {
+ if (language == null) {
url += "&language=en";
+ } else {
+ url += "&language=" + language;
}
return url;
}