B4A Library ICOSWorldForecast 3.50

GMan

Well-Known Member
Licensed User
Longtime User
Thx a lot - now i understood the "system" and the whole Enchilada works fine
 

GMan

Well-Known Member
Licensed User
Longtime User
I made a little code snippet for translating the english weather conditions into german.

Depending on a defined variable AppLanguage (as int) - english language is 0, german is 1 - it shows the german translation in the definded label lb4

Feel free to use and made some additional languages, too.

B4X:
   If AppLanguage = "1" Then
   Select True
       Case a.CCWeatherDescription = "Sunny"
      lb4.Text = "Sonnig"
      Case a.CCWeatherDescription = "Clear"
      lb4.Text = "Klar"
       Case a.CCWeatherDescription = "Cloudy"
           lb4.Text = "Bewölkt"
      Case a.CCWeatherDescription = "Partly Cloudy"
           lb4.Text = "teilweise Bewölkt"
      Case a.CCWeatherDescription = "Snowy"
           lb4.Text = "Schnee"
      Case a.CCWeatherDescription = "Stormy"
           lb4.Text = "Sturm"
      Case a.CCWeatherDescription = "Mist"
           lb4.Text = "Dunst"
      Case a.CCWeatherDescription = "Moderate rain"
           lb4.Text = "Regen"   
      Case a.CCWeatherDescription = "Light rain"
           lb4.Text = "leichter Regen"
      Case a.CCWeatherDescription = "Moderate rain at times"
           lb4.Text = "zeitweise Schauer"
      Case a.CCWeatherDescription = "Heavy rain at times"
           lb4.Text = "zeitweise starke Schauer"
      Case a.CCWeatherDescription = "Heavy rain"
           lb4.Text = "starker Regen"
      Case a.CCWeatherDescription = "Light freezing rain"
           lb4.Text = "leichter gefrierender Regen"
      Case a.CCWeatherDescription = "Moderate OR Heavy freezing rain"
           lb4.Text = "mittlerer bis starker gefrierender Regen"
      Case a.CCWeatherDescription = "Light drizzle"
           lb4.Text = "leichter Nieselregen"
      Case a.CCWeatherDescription = "Fog"
           lb4.Text = "Nebel"
      Case a.CCWeatherDescription = "Overcast"
           lb4.Text = "Bewölkt"
      Case a.CCWeatherDescription = "Light rain shower"
           lb4.Text = "leichte Regenschauer"
      Case a.CCWeatherDescription = "Moderate OR heavy rain shower"
           lb4.Text = "mittlere bis starke Regenschauer"
      Case a.CCWeatherDescription = "Torrential rain shower"
           lb4.Text = "Sintflutartige Regenfälle !" 
      Case a.CCWeatherDescription = "Light sleet showers"
           lb4.Text = "leichte Graupelschauer"
      Case a.CCWeatherDescription = "Moderate OR heavy sleet showers"
           lb4.Text = "mittlere bis starke Graupelschauer"
      Case a.CCWeatherDescription = "Moderate OR heavy snow showers"
           lb4.Text = "mittlere bis starke Schneeschauer"
      Case a.CCWeatherDescription = "Light showers of ice pellets"
           lb4.Text = "leichte Hagelschauer"
      Case a.CCWeatherDescription = "Light snow showers"
           lb4.Text = "leichte Schneeschauer"
      Case a.CCWeatherDescription = "Moderate OR heavy showers of ice pellets"
           lb4.Text = "mittlere bis starke Hagelschauer"
      Case a.CCWeatherDescription = "Patchy light rain In area with thunder"
           lb4.Text = "leichter örtlicher Regen mit Donner"
      Case a.CCWeatherDescription = "Moderate OR heavy rain In area with thunder"
           lb4.Text = "mittlere bis starker örtlicher Regen mit Donner"
      Case a.CCWeatherDescription = "Patchy light snow In area with thunder"
           lb4.Text = "leichter örtlicher Schnee mit Donner"
      Case a.CCWeatherDescription = "Moderate OR heavy snow In area with thunder"
           lb4.Text = "mittlere bis starker örtlicher Schnee mit Donner"
      Case a.CCWeatherDescription = "Ice pellets"
           lb4.Text = "Hagel"
      Case a.CCWeatherDescription = "Heavy snow"
           lb4.Text = "starker Schnee"
      Case a.CCWeatherDescription = "Patchy heavy snow"
           lb4.Text = "teilweise starker Schnee"
      Case a.CCWeatherDescription = "Moderate snow"
           lb4.Text = "mittlerer Schnee"
      Case a.CCWeatherDescription = "Patchy moderate snow"
           lb4.Text = "teilweise mittlerer Schnee"
      Case a.CCWeatherDescription = "Light snow"
           lb4.Text = "leichter Schnee"
      Case a.CCWeatherDescription = "Patchy light snow"
           lb4.Text = "teilweise leichter Schnee"
      Case a.CCWeatherDescription = "Moderate OR heavy sleet"
           lb4.Text = "mittlerer bis starker Schnee"
      Case a.CCWeatherDescription = "Light sleet"
           lb4.Text = "leichter Schneeregen"
      Case a.CCWeatherDescription = "Patchy light rain"
           lb4.Text = "teilweise leichter Regen"
      Case a.CCWeatherDescription = "Heavy freezing drizzle"
           lb4.Text = "starker gefrierender Nieselregen"
      Case a.CCWeatherDescription = "Freezing drizzle"
           lb4.Text = "gefrierender Nieselregen"
      Case a.CCWeatherDescription = "Patchy light drizzle"
           lb4.Text = "teilweise leichter Nieselregen"
      Case a.CCWeatherDescription = "Freezing fog"
           lb4.Text = "gefrierender Nebel"
      Case a.CCWeatherDescription = "Blizzard"
           lb4.Text = "Schneesturm"
      Case a.CCWeatherDescription = "Blowing snow"
           lb4.Text = "Schneetreiben"
      Case a.CCWeatherDescription = "Thundery outbreaks In nearby"
           lb4.Text = "Gewitter in der Nähe"
      Case a.CCWeatherDescription = "Patchy freezing drizzle nearby"
           lb4.Text = "teilweise gefrierender Nieselregen in der Nähe"
      Case a.CCWeatherDescription = "Patchy sleet nearby"
           lb4.Text = "leichter Schneeregen in der Nähe"
      Case a.CCWeatherDescription = "Patchy snow nearby"
           lb4.Text = "leichter Schneefall in der Nähe"
      Case a.CCWeatherDescription = "Patchy rain nearby"
           lb4.Text = "leichter Regen in der Nähe"
   End Select
   End If

I placed this code AFTER the call of the weather sub and it works fine.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi GMan thank you for the translation.

Ich spreche auch Deutsch, nicht perfekt, aber ich jetzt studiere.
I speak also German, not perfect, but I am now studying.

Manchmal mache ich Fehler. meine Grammatik ist nicht so gut.
Sometimes I make mistakes. my grammar is not so good.

Vielen Dank für deine Idee, ich hoffe, dass jemand anderes übersetzen es in andere Sprachen.
Thanks for your idea I hope someone else translate it into other languages.


I´ll do that.
 

GMan

Well-Known Member
Licensed User
Longtime User
Hi lonleystar,

german is my native language and so i know: the worst is the grammatic

Therefor english is the main language of the world :sign0089:
 

GMan

Well-Known Member
Licensed User
Longtime User
Hi loneleystar,

in the moment near Dortmund, between the "Ruhrgebiet" and the "Sauerland" area, but i also lived in the Netherlands and on Mallorca Island in Spain (but years ago)
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi loneleystar,

in the moment near Dortmund, between the "Ruhrgebiet" and the "Sauerland" area, but i also lived in the Netherlands and on Mallorca Island in Spain (but years ago)
Hi GMan,

now i living near Stuttgard, but from 1996 to 1999 i bin in Ijmuiden 20 km fro Amsterdam.
 

GMan

Well-Known Member
Licensed User
Longtime User
Hi,

now i living near Stuttgard,
i am very sad about that :sign0089:

About the "Schwaben" (the extra species of people who live there ) we say:
"Swabians are Scots, expelled for stinginess" :sign0089:
 

touchsquid

Active Member
Licensed User
Longtime User
The library works almost perfectly, except the day of week functions. Your demo app shows today as Monday, and tomorrow Tuesday etc. Unfortunately today is Thursday!

Can you help? If I use the library I'll definitely make a donation.

By the way, thanks for your great contributions to this forum.
 
Last edited:

javiers

Active Member
Licensed User
Longtime User
marine weather?

Hello
think expanding the library for marine weather ?

a greeting.
 

GMan

Well-Known Member
Licensed User
Longtime User
Tested - works well

Is there the possibilty to get moon phases from that service ?
weatherunderground also offers an api, which i use with coding windows software.
Depending on your answer i will have a look at it - should also be possible to implement in B4A :sign0060::icon_clap:

Aha, you changed
Full5DayName(0)

to

Full7DayName(0)
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi GMan,

it is possible only in premium.

I already start building the premium weather.
 

GMan

Well-Known Member
Licensed User
Longtime User
OK, then I will have a look to the Free Wunderground weather API :sign0087:
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Now TimeZoneID,GmtOffset,DstOffset,Sunrise,Sunset

Hi Guys,

I just upload the new update that now include:


TimeZoneID
GmtOffset
DstOffset
Sunrise
Sunset


B4X:
lb1.Text="TimeZoneID: "&a.TimeZoneID
lb2.text="GMT: "&a.GmtOffset&" - DstOffset: "&a.DstOffset
lb3.text="SunRise: "&a.Sunrise
lb4.text="SunSet: "&a.Sunset
 

Attachments

  • WorldForecast2.75.jpg
    86.1 KB · Views: 165

GMan

Well-Known Member
Licensed User
Longtime User
TOP Job - Thx a lot :icon_clap:
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…