• For some reason the google weather API only provides a celcius option for the current temperature, not the forecast?

    the weatherwidget script picks up the correct units F/C for your location but if your country uses celcius then it will still show farenheit for the forecast.

    I added a bit of code to roughly convert the temperatures in the forecast sections.

    its these two lines here:

    ‘low’ => (($this->sliceOut($match, ‘<low data=”‘, ‘”‘)-32)*0.5). $deg,
    ‘high’ => (($this->sliceOut($match, ‘<high data=”‘, ‘”‘)-32)*0.5). $deg,

    its not the most accurate conversion but it seems to do the trick.

    not sure if this problem is same for all C countries but might help if you’re stuck.

    http://wordpress.org/extend/plugins/weatherwidget/

Viewing 1 replies (of 1 total)
  • even i am using this plugin but forecast show’s in F but our country comfortable with C

    can you explain more about the code where i should add in the plugin page which line number ? it will be help full

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WeatherWidget] convert google weather API to celcius’ is closed to new replies.