Martin Kadlec blogging

Weather in Speed dial

[UPDATE 2012-01-26]
The post below is related to old version of my speed dial weather and still might be useful to someone who uses old versions of Opera. For Opera 11.50+ there is a new Opera extension:
https://addons.opera.com/en/addons/extensions/details/weather-by-wundergound/

______________________________________________________________________

Were you thinking about some alternative way how to use speed dial? Here is one way how you can do that. I've created site with big weather images and description.

So how it works?

First part is the URL of the site:
http://speeddial.operacesky.net/weather.php

Put this URL into some speed dial window

Second part is query string. There are five (all optional) parameters that you can use.
1 - Language: lang=en or cs/fr - default is "cs" (Czech language)
2 - Area: area=London - default is Prague (Capital of Czech Republic)
3 - Top: top=100 - this parameter sets margin-top css property of images and description, thank to this parameter you can align the main parts to center of your speeddial window.
4 - Redirect: redirect=http://www.wunderground.com/ - Site to which you get redirected when you click on speed dial window. Default http://www.wunderground.com/. You can also type: no - this means that you won't be redirected anywhere. If you want to use site with query string you will have to encode this URL, or use some site like http://bit.ly/ (that's what I do).

[NEW] 5 - Degrees: deg=F - Use Fahrenheit instead of Celsius

Thanks for Frenzie who gave me the idea of speed dial vs. real window detection.

So here is one completed example:
http://speeddial.operacesky.net/weather.php?lang=en&area=Oslo&top=100&redirect=http://is.gd/eoCvi

And here is screen of the result:


I hope you like it =)

BTW you should set time interval to reload this speed dial window (I use 30 minutes)

Comments
Please login to post comments.
Avatar
01.04.2015 18:49
Pleeeze could you leave your old version http://speeddial.operacesky.net/weather.php alive.
It is the *only way* to get weather forecast in Opera that works in older OS.
and it is so useful !!
Avatar
24.01.2013 17:01
Could you put a header title to show which city is showing up on screen? I use sask theme it has no title of speed dial items. So I can't know which city on screen.
Avatar
07.12.2012 20:12
Anonym writes:

Thanks to you Opera guys, I reanimated the formerly dead miniweather in my Firefox Speedial addon. I have a 9x9-grid an in the last row middle, put as url for preview: http://speeddial.operacesky.net/weather.php?lang=de&area=Hannover&top=100, horizontal adjust on and no cutting allowed. 3-day forecast with symbol and temperature. Great!
Avatar
07.08.2012 19:08

Originally posted by valeksandrov:

It should be working now. Could you please resend it?


Done. Check your Opera mail :)
Avatar
07.08.2012 03:08

Originally posted by BS-Harou:

Can you pleas log in on mail.opera.com so I can send it to you?


It should be working now. Could you please resend it?
Avatar
06.08.2012 10:08

Originally posted by valeksandrov:

Fair enough.


The extensions is build for the three-column weather and changing it to another template would be quite difficult. There is also lot's of very good extensions for one day only.

Originally posted by valeksandrov:

Looking forward!


You you should have the e-mail with localization file in your myopera mail :)

Update: ok you don't because you probably haven't activated it yet. Can you pleas log in on mail.opera.com so I can send it to you?
Avatar
06.08.2012 00:08
Fair enough. :)
Looking forward!
Avatar
04.08.2012 22:08
there is no such option, and probably won't be. sorry

but i'm interested in the translation. I'll send you e-mail once I return from vacation.
Avatar
04.08.2012 20:08
Hi Martin,

Thank you so much for your wonderful extension!
If you allow me a quick question: is there an option to switch from "three day forecast" to a forecast for "the current" day only?

Thanks again!

P.S. Let me know if you will be interested in Bulgarian translation.
Avatar
20.02.2012 18:02
http://files.myopera.com/BS-Harou/WbW/Weather%20by%20Wunderground1.2beta.oex

To enter more cities just separate them with semicolon like:
Oslo; Stockholm
Avatar
20.02.2012 17:02
metude: Don't get too much excited, but I have almost finished with implementing your idea. It still needs some work though. (I had to rewrite like 80% of my code because of this feature :D )
Avatar
27.01.2012 10:01
:)
Avatar
27.01.2012 07:01

Originally posted by z@h3k:

Pls think it. If metude says it, absolutely should be considered:)


Thanks zahek, your ideas is mostly realistic, my ideas is mostly utopic.
Avatar
26.01.2012 21:01
BS-Harou, ukrainian language in your box. :)
Avatar
26.01.2012 21:01

Originally posted by SATAB:

BS-Harou, ukrainian language in your box.



Thank you, thank you :)
Avatar
26.01.2012 17:01
Pls think it. If metude says it, absolutely should be considered:)
Avatar
26.01.2012 16:01
Could make it possible multiple cities? Changes per 5 second.
Avatar
26.01.2012 16:01

Originally posted by metude:

Could make it possible multiple cities? Changes per 5 second.



This is actually very interesting idea. I'm not promising anything, but I will definitely think about it. :)
Avatar
09.01.2012 23:01
Thanks BS-Harou for the explanations :) .

Charles.
Avatar
09.01.2012 23:01

Originally posted by Frenzie:

It has other disadvantages besides that. Until (speeddial) extensions are synchronized, you'll have to manually set it up on each installation of Opera.



It is really easy to set up the speed dial extension, but you are right that it is more comfortable to just sync the link :)
Avatar
09.01.2012 23:01

Originally posted by BS-Harou:

It is really easy to set up the speed dial extension, but you are right that it is more comfortable to just sync the link


It's the first speeddial extension I installed (not counting the demo clock thing a while ago), so for me it certainly doesn't matter, but I've seen how many speeddials some people have: there's no reason to presume they'll be any more restrained with speeddial extensions. ;)
Avatar
09.01.2012 21:01

Originally posted by theCharlesF:

But why do you need to create an extension, to get what is already working so fine in the "old way"?



Well, the thing is that the server where it is running is not exactly mine and it has some connection limits, so I don't want to cause any trouble. Also it is better that the request for weather info are going (in case of extension) from different IP addresses so they can't blacklist it.

Another reason is that I like programming in JS (extension) much more than PHP (the old way). And also I can make much more user-friendly options, thanks to "preferences" dialog.
Avatar
09.01.2012 21:01

Originally posted by theCharlesF:

But why do you need to create an extension, to get what is already working so fine in the "old way"?


It has other disadvantages besides that. Until (speeddial) extensions are synchronized, you'll have to manually set it up on each installation of Opera.
Avatar
09.01.2012 20:01

Originally posted by QuHno:

May be the Speed Dial Weather Unite Application (direct link) is of help for that, at least the parser in it


As you can see, I've already managed to create the Speed Dial ext. without Unite, but thx anyway :)
Avatar
09.01.2012 20:01
That is great! :yes:
Thank you SO MUCH.

But why do you need to create an extension, to get what is already working so fine in the "old way"? :worried:
For instance, people running an older version of Opera won't be able to keep it.
Avatar
09.01.2012 19:01

Originally posted by BS-Harou:

You are probably right. I guess I should create my own speed dial extension


May be the Speed Dial Weather Unite Application (direct link) is of help for that, at least the parser in it :D

(after install just type the city, may be as city+country if there is more than one with the same name, and add the output language. To get it into the speed dial, you can just copy the resulting URL to it. Multiple speed dials with different locations and languages are possible, as far as the Google API suppots it)
Avatar
09.01.2012 17:01
First speed dial extension prototype (English only):

http://files.myopera.com/BS-Harou/files/Weather%20by%20Wunderground.oex
Avatar
09.01.2012 17:01
That was quite fast. I haven't finished the book I'm reading yet. :P

Seems to work great. Thx.
Avatar
09.01.2012 15:01
Found it! I renamed it back to weather.php so it should be working like before - for now.
Avatar
09.01.2012 13:01

Originally posted by theCharlesF:

Which one?
Your thumbnail was the only one that displayed the weather for the next few days!
We miss it!!!


Agreed, I might be missing something but from the screenshots it seems that the others only display the weather for today?
Avatar
09.01.2012 13:01
You are probably right. I guess I should create my own speed dial extension :) In the meantime I would like to enable the old way , but I somehow forgot my FTP password O_O
Avatar
09.01.2012 13:01
Luckily, I only changed the name of the php file, change weather.php to good_weather.php :D
Avatar
09.01.2012 04:01

Originally posted by BS-Harou:

Yes, that is intetional. Use speedial extension instead.


Which one? :cry:
Your thumbnail was the only one that displayed the weather for the next few days! :love:
We miss it!!!
Avatar
01.01.2012 13:01
The weather is dead, weather.php had gone away)
Avatar
01.01.2012 13:01
Yes, that is intetional. Use speedial extension instead.
Avatar
25.04.2011 21:04
Cool Speed dial waiting for more updates on this
Thanks BS-Harou
Avatar
31.03.2011 12:03
i know, i will create new version for 11.10 when it will be final
Avatar
31.03.2011 11:03

Originally posted by SATAB:

SkyRE, это Вы с чего и к чему? Во-первых: на google Кривой Рог есть; во-вторых: у меня "Weather in Speed dial" работает, да.


Когда я писал свое сообщение, Кривого Рога не было. :eyes: Проверял через Google Ig API.
Avatar
31.03.2011 11:03
Кстати в Opera 11.10 beta 2067 - погода в speed dial ужо не работает.
Так же как и Yandex Maps, Yandex Pogoda.
Avatar
27.03.2011 16:03
SkyRE, это Вы с чего и к чему? Во-первых: на google Кривой Рог есть; во-вторых: у меня "Weather in Speed dial" работает, да. На указанном языке, спасибо BS-Harou.
Avatar
18.03.2011 16:03
Андрій Кривого Рога нет на google. Так что дело не в языке. У меня Киев нормально показывает на русском и украинском.
Avatar
11.03.2011 14:03

Originally posted by SATAB:

BS-Harou, info for you (in RU-lng)- http://my.opera.com/russian/forums/findpost.pl?id=8831822



Interesting, thank you for info :)
Avatar
11.03.2011 13:03
BS-Harou, info for you (in RU-lng)- http://my.opera.com/russian/forums/findpost.pl?id=8831822
Avatar
11.03.2011 10:03
I will wait for final verdion of O11.10. There might be some changes. :)
Avatar
11.03.2011 08:03
You should use this now!
http://dev.opera.com/articles/view/opera-speed-dial-enhancements/
Avatar
05.12.2010 10:12
Thanks, love it :)
Avatar
08.11.2010 23:11
:) thanks ;)
Avatar
08.11.2010 23:11
:) thanks ;)
Avatar
08.11.2010 20:11

Originally posted by Adonisali:

I want this speeddial as a bookmark 4 my opera mini 4.2 . Can you help me?



Hi, I was trying to do some mobile version, but there is plenty of problems. Firstly, you can set "reload interval" for speed dial windows, secondly there is very little space for the images so there might be only two of them. Thirdly, it's very hard to determine on mobile if the web page is loaded by speed dial or normally.
Avatar
08.11.2010 19:11
I want this speeddial as a bookmark 4 my opera mini 4.2 . Can you help me?
Avatar
08.11.2010 19:11

Originally posted by Adonisali:

I want this speeddial as a bookmark 4 my opera mini 4.2 . Can you help me?


Won't work on Mini at all since Opera Mini (4.2 and 5.1) doesn't render speed dials the same way.
Avatar
06.11.2010 16:11
you should make a extension about this speed dial...
Avatar
06.11.2010 16:11

Originally posted by logytech:

you should make a extension about this speed dial...


impossible (yet)
Avatar
01.09.2010 12:09

Originally posted by BS-Harou:

The date format I've chosen is the universal for whole world. Problem is that there is lots of countries with specific date format and I currently don't plan to change format according to country.


:up:
Avatar
01.09.2010 11:09
Can you change date stamp for Turkey like this dd-mm-yyyy?
Avatar
01.09.2010 11:09
metude: The date format I've chosen is the universal for whole world. Problem is that there is lots of countries with specific date format and I currently don't plan to change format according to country.
Avatar
30.08.2010 00:08

Originally posted by BS-Harou:

added

Thank you.

Originally posted by BS-Harou:

please wait

OK.
Avatar
29.08.2010 18:08

Originally posted by BS-Harou:

I'm back from my holiday and I'm going to fix as much issues as I can =)


The Toronto (city of Canada) I want is Toronto, Ontario, but it shows Toronto, Illinois (city of USA). How do I add the province/country to the url so that I can get my city?
Avatar
29.08.2010 18:08

Originally posted by jonnyquesty2k:

The Toronto (city of Canada) I want is Toronto, Ontario, but it shows Toronto, Illinois (city of USA). How do I add the province/country to the url so that I can get my city?



&area=Toronto,Ontario
Avatar
29.08.2010 06:08
Thank you so much BS-Harou. I typed that every way in the world, but I had the last part wrong. And a couple other little things. lol.

It't in there now, and it's fixed.
Avatar
28.08.2010 23:08

Originally posted by L2D2:

Never could get it to work for me. When I put Tyler, Tx, or U.S. in there, it always went back to default Prague, and I could never get it in Fahrenheit. Guess you'd have to type it out for me exactly what I'd have to have to get it to work. As it is, I just deleted it and put my local KLTV.com weather site in that dial.



http://speeddial.operacesky.net/weather.php?lang=en&area=Tyler&top=100&redirect=no&deg=f
Avatar
28.08.2010 23:08

Originally posted by mjerez:

I got no image at tstorm. Some days ago it worked. The 'src' in 'img' tag is empty.
Excellent work. Thanks.



fixed
Avatar
28.08.2010 20:08
Never could get it to work for me. When I put Tyler, Tx, or U.S. in there, it always went back to default Prague, and I could never get it in Fahrenheit. Guess you'd have to type it out for me exactly what I'd have to have to get it to work. As it is, I just deleted it and put my local KLTV.com weather site in that dial.
Avatar
28.08.2010 15:08

Originally posted by zwierzak2003:

You have problems with encodings



fixed

Originally posted by clashcityrocker:

Awesome, but currently showing a broken image for me



fixed

Originally posted by SATAB:

Українська, (uk):



added

Originally posted by SATAB:

BS-Harou, Rus: как надо писать в ссылке город который http://www.wunderground.com/global/stations/34504.html ?



Working on this one, please wait =)
Avatar
28.08.2010 14:08
I'm back from my holiday and I'm going to fix as much issues as I can =)
Avatar
27.08.2010 23:08







Fri
chancerain
18/11

Sat
partlycloudy
20/9

Sun
mostlycloudy
22/10

Avatar
27.08.2010 22:08
BS-Harou, Rus: как надо писать в ссылке город который http://www.wunderground.com/global/stations/34504.html ?

Eng: how to write in exile, a city that http://www.wunderground.com/global/stations/34504.html ?

Mark, like - today lost in the picture!
Avatar
27.08.2010 15:08
Awesome, but currently showing a broken image for me:


Source from result:








Fri
mostlycloudy
17/13

Sat
clear
17/13

Sun
chancerain
17/10
Avatar
27.08.2010 14:08
Українська, (uk):
http://www.google.com/ig/api?weather=Kryvyi%20Rih&hl=uk - my city.
Monday...Sunday - понеділок, вівторок, середа, четвер, п'ятниця, субота, неділя (пн, вт, ср, чт, пт, сб, нд).
January...December - Січень, Лютий, Березень, Квітень, Травень, Червень, Липень, Серпень, Вересень, Жовтень, Листопад, Грудень (Січ, Лют, Бер, Кві, Тра, Чер, Лип, Сер, Вер, Жов, Лис, Гру).
"Weather" - "Погода".
"We don't have any information for this city" - "Ми не маємо жодної інформації для цього міста"
Avatar
25.08.2010 11:08
When I write my city "Zduńska Wola" I gets it in url like that: "Zdu%F1ska%20Wola". This shows weather of my city, but in speed dial I get something like that: "Pogoda: Zdu?ska Wola". You have problems with encodings
Avatar
25.08.2010 06:08
I got no image at tstorm. Some days ago it worked. The 'src' in 'img' tag is empty.
Excellent work. Thanks.
Avatar
25.08.2010 02:08
The forecast from the website, http://www.wunderground.com/global/stations/71265.html

Compared to if I use "Toronto" in the url, I get different results... So I don't know the Toronto in the speed dial url is the same as my city.
Avatar
24.08.2010 10:08

Originally posted by metude:

Our users reported there's a problem for partly cloudy image. (for tr language)



still? don't have problem with this one here.

Originally posted by adas:

I wrote blog post about it: http://adas.jogger.pl/2010/08/24/pogoda-na-szybkim-wybieraniu-opery



Thank you, btw I need this sentence in Polish: "We don't have any information for this city"
Avatar
24.08.2010 10:08

Originally posted by BS-Harou:

Thank you, btw I need this sentence in Polish: "We don't have any information for this city"


"Nie posiadamy żadnych informacji dla tego miasta"
Avatar
24.08.2010 10:08
Brak danych dla wybranego miasta (i think it will be understand by users ;) )

Edit: Too late...:doh:
Avatar
24.08.2010 10:08
ok, should be fully working now =)
Avatar
24.08.2010 08:08
Polish (pl):

Monday > Poniedziałek > Pon
Tuesday > Wtorek > Wto
Wednesday > Środa > Śro
Thursday> Czwartek > Czw
Friday > Piatek > Pią
Saturday > Sobota > Sob
Sunday > Niedziela > Nie

I wrote blog post about it: http://adas.jogger.pl/2010/08/24/pogoda-na-szybkim-wybieraniu-opery/
Avatar
24.08.2010 04:08
Our users reported there's a problem for partly cloudy image. (for tr language)

http://www.operaturkiye.net/hizli-erisimde-hava-durumu :up:
Avatar
23.08.2010 23:08

Originally posted by Sn3ipen:

If I want to know what weather I have outside right now I will take a look out of my windows.


So why do you use this speeddial feature? Because on the first position is weather forecast of present day. ;-] You missed the point, which is featuring solution just like in Touch the Sky widget. And it would be url option, so you missed the point twice. ;]
Avatar
23.08.2010 19:08

Originally posted by xorandor:

I'd suggest also a switch to show current weather/temperature instead of 3 day (5 day in original) forecast.



If I want to know what weather I have outside right now I will take a look out of my windows.
Avatar
23.08.2010 19:08

Originally posted by Sn3ipen:

If I want to know what weather I have outside right now I will take a look out of my windows.



interesting idea ... huh O_O .. There is tree behind my window :D
Avatar
23.08.2010 19:08
I think I have my desktop behind my window. :P
Avatar
23.08.2010 18:08
Awesome and useful idea! Many thanks for it. I'd suggest also a switch to show current weather/temperature instead of 3 day (5 day in original) forecast.
Avatar
23.08.2010 17:08
:up:
Avatar
23.08.2010 14:08

Originally posted by BS-Harou:

should be fixed now


Fixed.

http://speeddial.operacesky.net/weather.php?lang=tr&area=Istanbul&top=100&redirect=http://is.gd/eyCtW
Redirection doesn't work.

If you can, here is the Turkish Months. And our calender type "dd mmm yyyy"
January - Ocak
February - Şubat
March - Mart
April - Nisan
May - Mayıs
June - Haziran
July - Temmuz
August - Ağustos
September - Eylül
October - Ekim
November - Kasım
December - Aralık
Avatar
23.08.2010 14:08

Originally posted by metude:

If you can, here is the Turkish Months. And our calender type "dd mmm yyyy"



I just finished translating of days and I need to rest a bit :sherlock: + tomorrow I'm leaving Prague and going on my holiday so I won't have access to the Internet.

When I return I'll probably add translation for Months - Or jsut simple change the string to number =)
Avatar
23.08.2010 14:08

Originally posted by BS-Harou:

I just finished translating of days and I need to rest a bit


:up:

Good holidays...
Avatar
23.08.2010 12:08
"We've got some connection problems, trying to fix it! Looks like Google don't like so many connections from our site."
It's not working at all :/
Avatar
23.08.2010 12:08

Originally posted by zaiddabaeen:

It's not working at all :/



I know, I'm trying to find some way how to fix this. Any ideas?
Avatar
23.08.2010 12:08
Is there a problem for Ç letter or there's a problem for encoding.




Avatar
23.08.2010 12:08

Originally posted by metude:

Is there a problem for Ç letter or there's a problem for encoding.



encoding :/

should be fixed now
Avatar
22.08.2010 12:08

Originally posted by tareqf1:

Area Code : Dhaka doesn't work. Am I missing something?
the website shows weather report for Dhaka, Bangladesh though.



And Dhaka, Bangladesh is the right one or some other Dhaka?
Avatar
22.08.2010 05:08
Area Code : Dhaka doesn't work. Am I missing something?
the website shows weather report for Dhaka, Bangladesh though.
Avatar
21.08.2010 18:08
fantastic!!!!!!!!!!!!!!!!!! :yes: :up: :love:
Avatar
21.08.2010 16:08

Originally posted by BS-Harou:

I'll add Turkish later (but still today) =) - but you should have already at least days in Turkish.


There's no problem for Turkish days. Thanx. When you will update for that texts we'll write a post on Opera Türkiye . Thank you for this usefull tool.
Avatar
21.08.2010 16:08

Originally posted by metude:

There's no problem for Turkish days. Thanx. When you will update for that texts we'll write a post on Opera Türkiye . Thank you for this usefull tool.



I add the translation, everything should be working now.
Avatar
21.08.2010 16:08
Everything looks well for Turkish.
---
I have opinion like this.

I can't explain with details because of i haven't got good English.

RSS for speeddial:
- Taking names of rss feed and shorting for screen.
URL can be like that http://rss.operacesky.net/rss.php?url=feedburner.com/rssexample&redirect=http://is.gd/eoCvi
Avatar
21.08.2010 16:08

Originally posted by metude:

RSS for speeddial:



It's not bad idea but there is RSS Reader implemented directly in Opera, so I don't think that this will have big reaction.
Avatar
21.08.2010 09:08

Originally posted by metude:

Did you tried this. Open page Notepad++, Encoding > Convert to UTF8. Someone faster than me.



It was much more complicated than that, but it's fixed now =)

I'll add Turkish later (but still today) =) - but you should have already at least days in Turkish.
Avatar
21.08.2010 08:08
This is fantastic! Thanks! :cool: :up:
Avatar
21.08.2010 07:08

Originally posted by BS-Harou:

- "Weather"
- "We don't have any information for this city"


Weather = Hava Durumu (But if this too long, you can use just "Hava")
- Bu şehir için bilgi yok. (

Originally posted by BS-Harou:

it shows wrong characters, but I can't figure out hy. Everywhere is UTF-8, I tried dozens of conversions but still without success. Any ideas?


Did you tried this. Open page Notepad++, Encoding > Convert to UTF8. Someone faster than me.

Tip: Set Automatic reload time with 1440 minutes. Your weather info will update every. (I'm not sure "page default" option working.)
Avatar
21.08.2010 04:08
for the C/F degrees option, for lang= choose of one the two

en - Celsius
us - Fahrenheit
Avatar
21.08.2010 00:08

Originally posted by BS-Harou:

very nice =)


Aha - approval, great stuff.

I've a question - I was trying to figure out the Goog api. Do you know if there's any way to set Celcius/Fahrenheit explicitly or is it always set by language code (and annoyingly defaults to F for en :( )?
Avatar
21.08.2010 00:08

Originally posted by lucideer:

o you know if there's any way to set Celcius/Fahrenheit explicitly or is it always set by language code (and annoyingly defaults to F for en :( )?



:( (nope)
Avatar
20.08.2010 23:08

Originally posted by Frenzie:

In the end it comes down to the good old proverb that without seeing some code, it's like trying to operate on a patient in a dark.



ok, you've got the code in PM
Avatar
20.08.2010 23:08

Originally posted by Sn3ipen:

What about making a Unite app out of this so people can host their own script?


I've done up a quick and dirty one - if anyone wants to take it further and add features, help yourselves.
http://files.myopera.com/lucideer/files/Speeddial.ua

I haven't added a redirect to it (yet) like BS-Harou's version, and you can't customise the top-margin either - as I said, it's just a quick proof-of-concept. I have however set it up with the possibility of adding more (non-weather) speed-dials, if anyone has any suggestions.
Avatar
20.08.2010 23:08

Originally posted by lucideer:

I've done up a quick and dirty one - if anyone wants to take it further and add features, help yourselves.
http://files.myopera.com/lucideer/files/Speeddial.ua



very nice =)
Avatar
20.08.2010 22:08

Originally posted by QuHno:

Nope, "vn"

see Wikipedia



but google show english translation for "vn" but probably Vietnamese translation for "vi" :P

EDIT: ok it's probably not Vietnamese, but it doesn't look like "Virgin Islands" too :D
Avatar
20.08.2010 22:08

Originally posted by QuHno:

Nope, "vn"

see Wikipedia


The language codes and Internet domains are unrelated. You need the ISO 639-1 standard for this kind of thing.

ISO 639-1 vi
ISO 639-2 vie
ISO 639-3 vie
http://en.wikipedia.org/wiki/Vietnamese_language



Also see this nice list.
Avatar
20.08.2010 22:08
Great! ;)
Avatar
20.08.2010 22:08
Uups... Sorry! :doh:

See also here :)
Avatar
20.08.2010 22:08

Originally posted by Frenzie:

The language codes and Internet domains are unrelated. You need the ISO 639-1 standard for this kind of thing.



thanks

btw I've got problem with Russian: http://speeddial.operacesky.net/weather.php?lang=ru&top=100&area=Praha&redirect=no

it shows wrong characters, but I can't figure out hy. Everywhere is UTF-8, I tried dozens of conversions but still without success. Any ideas?
Avatar
20.08.2010 22:08

Originally posted by BS-Harou:

it shows wrong characters, but I can't figure out hy. Everywhere is UTF-8, I tried dozens of conversions but still without success. Any ideas?


Do the PHP files have the BOM? That could cause problems. See for example here. If you save it as UTF-8 cookie (no BOM, but still UTF-8), it could potentially solve issues created by this PHP bug.

If that's not it, no idea. You're getting the names of the days from Google?
Avatar
20.08.2010 22:08

Originally posted by Frenzie:

If that's not it, no idea. You're getting the names of the days from Google?



Yes, from Google. And it doesn't look like there is the BOM bug (at least as far as I was able to understand it).
Avatar
20.08.2010 22:08
Are you doing anything other than echoing the names of the days? Generally speaking the PHP parser just stupidly passes bytes through, so that shouldn't cause an issue.

In the end it comes down to the good old proverb that without seeing some code, it's like trying to operate on a patient in a dark. :P
Avatar
20.08.2010 21:08

Originally posted by thaodp:

Vietnamese:
- Thời tiết
- Chúng tôi không có thông tin về thành phố này.



what is the abbreviation for Vietnamese? "vi"?
Avatar
20.08.2010 21:08
This gave me a few ideas. :idea:

What about making a Unite app out of this so people can host their own script?

Or using the same kind of technique to show a custom speed dial image. I believe someone could make a Unite App of that?
Avatar
20.08.2010 21:08

Originally posted by BS-Harou:

what is the abbreviation for Vietnamese? "vi"?


Nope, "vn"

see Wikipedia :)
Avatar
20.08.2010 20:08
very cool!
Avatar
20.08.2010 20:08
Vietnamese:
- Thời tiết
- Chúng tôi không có thông tin về thành phố này.
Avatar
20.08.2010 19:08
German, de, de-DE, de-AT, de-CH,: Wetter - Die Information ist vorübergehend nicht verfügbar.
Dutch, nl: Weer - Informatie is tijdelijk niet beschikbaar.
Avatar
20.08.2010 19:08
Norwegian: Vær

Im not sure if you should use no, nb or nn.

Just add them all to be safe, because the word for weather is the same in both Norwegian main languages(nb and nn).
Avatar
20.08.2010 19:08
I loaded the script in Opera mini 4.2 and it worked in dutch by default. :up: Great but now i only need a way to bookmark it, because i do not have visual speeddials. Also i would like to have a bookmarklet like These. to bookmark links in a page direct. for you, it should be a piece of cake.
Avatar
20.08.2010 19:08
QuHno & Joachim: Thank you, I'll implemented very soon.
Avatar
20.08.2010 18:08

Originally posted by BS-Harou:

I need those two:
- "Weather"
- "We don't have any information for this city"



Hungarian translation:

Weather = Időjárás
We don't have any information for this city = Nincs semmilyen információnk erről a városról

Furthermore:

Monday > Hétfő
Tuesday > Kedd
Wednesday > Szerda
Thursday> Csütörtök
Friday > Péntek
Saturday > Szombat
Sunday > Vasárnap

----------------

In the city names, that contains accent, works with the encoded format.
Just enter the name to the Google Search and copy the encoded format.
For example: Győr = Gy%C5%91r
Avatar
20.08.2010 18:08
Penge:

Thank you.

I want tonight add support for all languages that google supports, but there is translation only for days, so if anyone else want the "weather" word in his language he has to send me the translation.
Avatar
20.08.2010 18:08
:cool:

Avatar
20.08.2010 16:08
very nice got to try this one :) :up:
Avatar
20.08.2010 16:08

Originally posted by BS-Harou:

the problem is that I need word "Weather" and sentence "We don't have information for this city"


Why not just check for the existence of the Element. Primitive but quite complete snippet (without language detection or GET request check):
<?php 

function getWeather() {

$requestAddress = "http://www.google.com/ig/api?weather=Oslo&hl=fi";
// Downloads weather data based on location - where is Oslo? :D
$xml_str = file_get_contents($requestAddress,0);
// Parses XML
$xml = new SimplexmlElement($xml_str);

// Loops XML
$count = 0;
echo '<div id="weather">';
if ($xml->problem_cause && ($xml->problem_cause['data'] != '')){
echo '<div>Damn! No Weather!</div>';
} else {
foreach($xml->weather as $item) {
foreach($item->forecast_conditions as $new) {
echo '<div class="weatherIcon">';
echo '<img src="http://www.google.com/' .$new->icon['data'] . '"/><br />';
echo $new->day_of_week['data'];
echo '</div>';
}

}
}
echo '</div>';
}

getWeather();
?>
Avatar
20.08.2010 16:08

Originally posted by BS-Harou:

this works, can you give me name of the city you want?


I was mean language support.

Monday > Pazartesi
Tuesday > Salı
Wednesday > Çarşamba
Thursday> Perşembe
Friday > Cuma
Saturday > Cumartesi
Sunday > Pazar

Sorry i have limited time for now, i didn't read other comments.
Avatar
20.08.2010 16:08
metude: thanks, but days are finally only thing I don't need. :P

I need those two:
- "Weather"
- "We don't have any information for this city"
Avatar
20.08.2010 14:08
:yikes: :cool: Amazing! I need to try this :up:
Avatar
20.08.2010 13:08
Awesome work!
Avatar
20.08.2010 13:08
QuHno: get the language from $_SERVER["HTTP_ACCEPT_LANGUAGE"] is very good idea I will implemented as soon as I can =) I've also forgot that in US they use F instead of F, thanks for that)

However I'm working now on one new userJS so I'll update this after I finish at least "pre-alpha" of this new userJS =)

Originally posted by QuHno:

@metude: Would work with tr too, see here



the problem is that I need word "Weather" and sentence "We don't have information for this city" :D ... I will probably combine days in selected language with those two words in English)
Avatar
19.08.2010 14:08

Originally posted by BS-Harou:

Everything is here: (...)

Ah! Via the iGoogle API and the response from Google is valid, too. I didn't think about that. Thank You.

edit:

I believe most of the Opera users have set their native language as first in thr language settings so you could use this for an automatic UI language detection for the hl= part of the query string:
if ( isset( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ) ){
$languages = strtolower( $_SERVER["HTTP_ACCEPT_LANGUAGE"] );
$pos = strpos(';',$languages);
if ($pos !== false){
$languages = substr( $languages, 0, pos-1 );
}
$pos = strpos(',',$languages);
if ($pos !== false){
$languages = substr( $languages, 0, pos-1 );
}
}
The double strpos is needed because of the °C,km/h | °F,mph (SI|US) switch.
You get °C when using British English or any other language:
http://www.google.com/ig/api?weather=Oslo&hl=en-gb
in comparison to the assumed US setting with °F and mph when using plain English:
http://www.google.com/ig/api?weather=Oslo&hl=en

If the set language is not supported by Google, it defaults to US English, so no harm done:
http://www.google.com/ig/api?weather=Oslo&hl=XX

Most of the world (except USA) use SI instead of US values so may be you should prefer en-gb to get the SI units if the first "Accept Language" is en like it is in my string: en,de;q=0.9,de-DE;q=0.8 ... ;)

@metude: Would work with tr too, see here :)
Avatar
19.08.2010 13:08
added "fr" to languages
Avatar
19.08.2010 13:08
Thanks again for supporting [fr] :yes:
Avatar
19.08.2010 12:08
It looks there's no Turkish (tr) support.
Avatar
19.08.2010 12:08

Originally posted by metude:

It looks there's no Turkish (tr) support.



http://speeddial.operacesky.net/weather.php?lang=en&area=Ankara

this works, can you give me name of the city you want?

EDIT: you mean probably alnguage. No it's not (yet). There is only en, cs and fr, but if you want I can send you list of things for translation =)
Avatar
19.08.2010 11:08

Originally posted by QuHno:

What's the syntax for the request to Google to receive the XML file? Is it open or do you have to subscribe somewhere?



Everything is here: http://www.google.com/ig/api?weather=YOUR_CITY

BTW I do plan do give you the source after week or two)
Avatar
19.08.2010 11:08
add 4 parameter for redirect.
Avatar
19.08.2010 10:08
For the record, before other people waste time duplicating effort, this was my suggestion (you might need to disable Javascript to actually see it properly).

BS-Harou pointed out that vertical-align wasn't chosen in case of smaller speed dials, upon which I suggested to use vertical-align unless a top offset were specifically specified, and that the horizontal part of the speed dial doesn't seem to be affected by such so that no left offset is required.

If someone can think of a better way to detect whether something's a speed dial than what I came up with after seeing this idea, I'd be glad to hear it.

Also, QuHNo, I don't know about Google, but Weather Underground offers RSS from which one could easily extract such information. That's one of the reasons I'd like the source, since I'd prefer to host it myself as well as avoid Google (of course it shouldn't be too hard to replicate, but heck, an original idea is an original idea!).
Avatar
19.08.2010 08:08

Originally posted by BS-Harou:

I just use XML file from google


What's the syntax for the request to Google to receive the XML file? Is it open or do you have to subscribe somewhere?
Avatar
19.08.2010 01:08

Originally posted by BS-Harou:

your suggestions


Unite "speed-dial" app - it could start out with just weather, and then add other pages serving useful info to the speed-dial thumbs.... I'm not sure what exactly though... just an idea.
Avatar
19.08.2010 01:08
9ice Idea.
Avatar
19.08.2010 00:08
Interesting thought. You should open up the source so others can play around with it too. :)

At any rate, I'll be posting some improvement suggestions in a few minutes.
Avatar
19.08.2010 00:08
well there isn't actually a lots of code. I just use XML file from google and print the information to the page =)

I'm ready for your suggestions =)
Avatar
18.08.2010 22:08
:yikes:

Hide extra comments