Is there an autodetect value for the unit+system parameter?

YoWindow widget Questions, Suggestions and Bugs
jackaroo

Is there an autodetect value for the unit+system parameter?

Post by jackaroo »

I am planning to use the widget on my site. I want my visitors to see their weather in their location and of course use the unit_system of their country. Basically it is always metric except in the US and a few very small countries. From the documentation I see that the allowed values for the widget are "us" or "metric". Is there an undocumented value of "auto" or something similar, which would choose the proper unit system generally in use in that country?
User avatar
Don
Posts: 687
Joined: Tue Sep 14, 2010 12:14 am
Name: Don
Location: Roseville, California, United States of America
Contact:

Re: Is there an autodetect value for the unit+system paramet

Post by Don »

jackaroo,
Remove the unit_system parameter and YoWindow will use your visitors' IP address to determine which unit system to use.

Don
jackaroo

Re: Is there an autodetect value for the unit+system paramet

Post by jackaroo »

Don,

Thank you very much for the information. You saved me a lot of work. I was already looking into using my own geolocation code.

Jackaroo
jackaroo

Re: Is there an autodetect value for the unit+system paramet

Post by jackaroo »

Don,

Me again. I used your suggestion on my website (i.e. remove the unit_system parameter), and I had a few people from Canada check. They saw units in farenheit; in Canada it should be Celsius. The city was ok but not the units.

jackaroo
User avatar
Don
Posts: 687
Joined: Tue Sep 14, 2010 12:14 am
Name: Don
Location: Roseville, California, United States of America
Contact:

Re: Is there an autodetect value for the unit+system paramet

Post by Don »

jackaroo wrote:Don,

Me again. I used your suggestion on my website (i.e. remove the unit_system parameter), and I had a few people from Canada check. They saw units in farenheit; in Canada it should be Celsius. The city was ok but not the units.

jackaroo
Maybe YoWindow uses Fahrenheit for all of North America. :? Perhaps Pavel can answer that one for us :?:

If you could post a link to your YoWindow page maybe some of our friends from other countries could have look and tell us what they see. Any volunteers? :)

Don
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Is there an autodetect value for the unit+system paramet

Post by ikarus1969 »

Don wrote:Any volunteers? :)
Me, me! Gimme the website to check units! :)
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
User avatar
Don
Posts: 687
Joined: Tue Sep 14, 2010 12:14 am
Name: Don
Location: Roseville, California, United States of America
Contact:

Re: Is there an autodetect value for the unit+system paramet

Post by Don »

ikarus1969 wrote:Me, me! Gimme the website to check units! :)
You can check my site if you want. http://home.surewest.net/donjr/yowindow ... r_six.html
jackaroo has me wondering if this feature works the way I think it does.
ikarus1969
Posts: 1645
Joined: Wed Nov 18, 2009 9:58 am
Location: Vienna, Austria

Re: Is there an autodetect value for the unit+system paramet

Post by ikarus1969 »

Don wrote:
ikarus1969 wrote:Me, me! Gimme the website to check units! :)
You can check my site if you want. http://home.surewest.net/donjr/yowindow ... r_six.html
jackaroo has me wondering if this feature works the way I think it does.
i'm sorry, neither location nor units are ok for my city (vienna, metric) :(
»Man is impressive. In a universe full of untold secrets he has invented boredom.«
User avatar
Leif
Posts: 103
Joined: Mon Dec 13, 2010 5:52 pm
Name: Leif
Location: Umeå, Sweden

Re: Is there an autodetect value for the unit+system paramet

Post by Leif »

ikarus1969 wrote: i'm sorry, neither location nor units are ok for my city (vienna, metric) :(
Same here (Umeå, Sweden - metric)
Get Radio? Sure! - the best Internet Radio Player ever? ;)
FvE
Posts: 7114
Joined: Mon Oct 19, 2009 11:56 pm
Name: Fred
Location: Leiden, Netherlands
Contact:

Re: Is there an autodetect value for the unit+system paramet

Post by FvE »

Hi Jackaroo,

Just to let you know:

Location was detected right for me (Mijdrecht, Netherlands), but the units should be metric.
It showed me Fahrenheit instead.

I'm sorry, but I don't know if and how this can be changed.

Goodluck,
Fred
Post Reply