marquee-scroller
marquee-scroller copied to clipboard
Additional languages
How can I add additional languages other than English when displaying news and weather?
Hello, for the news you must select a service in your language, for the weather I am trying to find the line that calls the API because I have read in OpenWeather that in the call you can change the language http://api.openweathermap.org/data/2.5/weather? id = 524901 & CHANGE LANGUAGE = fr & appid = {API key}, Explains it at https://openweathermap.org/current#multi but I can't find the line of code that makes the call, if someone can help it would be very kind, thanks
Look at OpenWeatherMapClient.cpp
At Line 44:
String apiGetData = "GET /data/2.5/group?id=" + myCityIDs + "&units=" + units + "&cnt=1&APPID=" + myApiKey + " HTTP/1.1";
and change it like this:
String apiGetData = "GET /data/2.5/group?id=" + myCityIDs + "&units=" + units + "&lang=fr" + "&cnt=1&APPID=" + myApiKey + " HTTP/1.1";
Thanks a lot!!!!! It works perfectly, so I keep the line for Spanish language in case someone needs it: void OpenWeatherMapClient::updateWeather() { WiFiClient weatherClient; String apiGetData = "GET /data/2.5/group?id=" + myCityIDs + "&units=" + units + "&lang=sp" + "&cnt=1&APPID=" + myApiKey + " HTTP/1.1";