Closed TuxSeb closed 6 years ago
Hi @TuxSeb thanks for pointing this out
I've checked out and it looks like everything works fine. When you call print w
the weather's status
property is printed but unfortunately that string is not translated by the OWM API
The reason is mentioned here: https://openweathermap.org/current :
The NOTE says that only the description
JSON field is returned in translation (in French in your case). That JSON field is then mapped by PyOWM onto thedetailed_status
field of class Weather
Just to counter check, please execute:
import pyowm
owm = pyowm.OWM(API_key='MY_API_KEY', language='fr')
observation = owm.weather_at_place('London,GB')
w = observation.get_weather()
print w.get_status()
print w.get_detailed_status()
and you should get something like:
Haze
brume sèche
depending on the actual weather in London now.
But I do see your point: if one wants to print weather status in a certain language, why should that info be printed in English?
I will augment the Weather.__repr__
method with the detailed status so that the translated string is printed out
Ok, thanks you !
I have an issue when i'm trying to use French on pyowm, here's the the code:
and here's the output:
What Pyowm is supposed to do when we use an other language ? shouldn't it print the French word for haze ?
pyowm version: 2.8.0
thanks for your help