Closed martinorob closed 9 years ago
This is the right place :)
I am not sure that Yahoo actually supports different languages ... do you have a link that shows it?
In any case, you can change the weekday names to your language: Look for dayMapping:
in the widget file and just change the weekday names there
Hi Felix, yes i can change the weekday name in dayMapping but this doesn't change the forecast language!
In the documentation of yahoo api i have found this
https://developer.yahoo.com/weather/documentation.html
language: The language of the weather forecast, for example, en-us for US English.
and in the developer page https://developer.yahoo.com/weather/
there is a:
"lang": "it-it" option.
May this help you to implement the language option?
Thanks
thanks for the pointers.
I can't seem to find the option though. The first link just shows the language the feed is in (not the language you want it in) and I see no references to language options in the second link. It could be that you have more options when you have an account with Yahoo (which I don't)
I also tried sending a language with the request with `lang=it-it" and various permutations, but it doesn't do anything. I also found this link that suggests that they don't support different languages, but the link is quite old.
I will keep looking though!
Thanks Felix, you are right... i have not remember that when i was using Geektools i have created a "langMapping" option..
like this: "Partly Cloud") desc="Parz. Nuvoloso";; "Showers") desc="Pioggia";; "Partly Cloudy") desc="Nuvoloso";; "AM Showers") desc="Pioggia al Mattino";; "PM Showers") desc="Pioggia alla sera";; "PM Thunderstorms") desc="Temporali alla sera";; "Scattered Thunderstorms") desc="Temporali sparsi";; "Light Rain with Thunder") desc="Pioviggina con temporali";; "Thunderstorms") desc="Temporali";; "Heavy Rain") desc="Pioggia persistente";; "Mostly Sunny") desc="Parz. Soleggiato";; "Light Rain") desc="Piovischio";; "Fog") desc="Nebbia";; "Fair") desc="Sereno";; "Sunny") desc="Soleggiato";; "AM Rain") desc="Pioggia al mattino";; "PM Rain") desc="Pioggia alla sera";; "Mostly Cloudy") desc="Prev. Nuvoloso";; "Isolated Thunderstorms") desc="Temporali isolati";; "Thundershowers") desc="Temporali";; "Heavy Thunderstorms") desc="Forti Temporali";; "Clear") desc="Bel tempo";; "Rain") desc="Pioggia";; "Cloudy") desc="Nuvoloso";;
but that was in bash...
may you add the "langMapping" option at this point? :)
I will have a look!
for now you could add it yourself:
on line 189 change
el.find('.text').text weather.condition.text
to
el.find('.text').text @textMapping[weather.condition.text]
and then add the text mapping at the end like:
textMapping:
"Partly Cloud" :"Parz. Nuvoloso"
"Showers" :"Pioggia"
"Partly Cloudy" :"Nuvoloso"
"AM Showers" :"Pioggia al Mattino"
"PM Showers" :"Pioggia alla sera"
"PM Thunderstorms" :"Temporali alla sera"
"Scattered Thunderstorms" :"Temporali sparsi"
"Light Rain with Thunder" :"Pioviggina con temporali"
"Thunderstorms" :"Temporali"
"Heavy Rain" :"Pioggia persistente"
"Mostly Sunny" :"Parz. Soleggiato"
"Light Rain" :"Piovischio"
"Fog" :"Nebbia"
"Fair" :"Sereno"
"Sunny" :"Soleggiato"
"AM Rain" :"Pioggia al mattino"
"PM Rain" :"Pioggia alla sera"
"Mostly Cloudy" :"Prev. Nuvoloso"
"Isolated Thunderstorms" :"Temporali isolati"
"Thundershowers" :"Temporali"
"Heavy Thunderstorms" :"Forti Temporali"
"Clear" :"Bel tempo"
"Rain" :"Pioggia"
"Cloudy" :"Nuvoloso"
It work like a charm!!!!!!!! Thanks you Felix!!!!!
Martino
Hi, this is not an Issue but a request. (i don't know where i have to write a request). May you add the option to change the language go the weather-widget?
Yahoo api have the "language" option.
Thanks