Hello,
With LANGUAGE=fr env integrated (issue #107 ), the weather widget still display english informations...
In fact, lang is already in the openweathermap request parameter (API/Weather.php line 44).
https://api.openweathermap.org/data/2.5/weather?units=metric&lat=47.860879&lon=-1.801214&lang=fr&appid=my_key
Response is :
{"coord":{"lon":-1.8012,"lat":47.8609},"weather":[{"id":804,"main":"Clouds","description":"couvert","icon":"04d"}],"base":"stations","main":{"temp":12.77,"feels_like":12.43,"temp_min":12.77,"temp_max":14.03,"pressure":1020,"humidity":89,"sea_level":1020,"grnd_level":1014},"visibility":10000,"wind":{"speed":1.63,"deg":31,"gust":1.83},"clouds":{"all":100},"dt":1716536717,"sys":{"type":2,"id":2007485,"country":"FR","sunrise":1716524328,"sunset":1716580181},"timezone":7200,"id":2984191,"name":"Redon","cod":200}
You use the xpath /weather/0/main to display the weather widget. this is not a translated part.. but the xpath /weather/0/description is : "couvert" is the french word...
Same for lang=de: "main":"Clouds","description":"Bedeckt"
Could you select the appropriate xpath to display for the next tag ?
jumpapp/assets/js/src/classes/Weather.js line 58:
description: data.weather[0].main,
replaced by
description: data.weather[0].description.charAt(0).toUpperCase() + data.weather[0].description.slice(1),
Thanks :)
Hello,
With LANGUAGE=fr env integrated (issue #107 ), the weather widget still display english informations...
In fact, lang is already in the openweathermap request parameter (API/Weather.php line 44).
https://api.openweathermap.org/data/2.5/weather?units=metric&lat=47.860879&lon=-1.801214&lang=fr&appid=my_keyResponse is :
You use the xpath
/weather/0/mainto display the weather widget. this is not a translated part.. but the xpath/weather/0/descriptionis : "couvert" is the french word...Same for lang=de:
"main":"Clouds","description":"Bedeckt"Could you select the appropriate xpath to display for the next tag ?
jumpapp/assets/js/src/classes/Weather.js line 58:
description: data.weather[0].main,replaced by
description: data.weather[0].description.charAt(0).toUpperCase() + data.weather[0].description.slice(1),Thanks :)