B4A Library ICOSWorldForecast 3.50

microbox

Active Member
Licensed User
Longtime User

Laurent95

Active Member
Licensed User
Longtime User

Hello,
You probably had does a mistake somewhere.
I have try again the download and the two parts are different, the second contains the B4A files and a bit more folder resources.
Which zipper you use ? I have Winrar and no problem with it.

@Giuseppe,
Hi and thanks for the new version, that works like a charm. My widget has got a new teen age now
Grazie
 

microbox

Active Member
Licensed User
Longtime User
Hi, thanks for replying. I have winrar...I'll try it again.

kind regards,
tacbanon
 

microbox

Active Member
Licensed User
Longtime User
Hi..I'm sorry if this is so basic but I'm having trouble with the right files when unzipping..
Please check the image I attached.
When I unzipped the ICOSWorldForecast_DEMO.part1.rar it gave me ICOSWorldForecast_DEMO folder and when I tried to unzip the ICOSWorldForecast_DEMO.part2.rar I think it still gave me ICOSWorldForecast_DEMO folder because it warns a file already exist. Hope anyone can shade some light what I'm doing wrong.

Thanks in advance...
 

Attachments

  • ForecastFolder.png
    25.9 KB · Views: 181

microbox

Active Member
Licensed User
Longtime User
Hi, I just download the demo par 1 and part 2 i dind rename it, just unrar successfully.


P.S.

This is the first demo whit the first library U've to cange Dim a as ICOSWorldForecast to dim a as ICOSWorldForecastFree
Hi thanks for the time...I did follow your advice (change Dim a as ICOSWorldForecast to dim a as ICOSWorldForecastFree) but it gives an error when compiling

B4X:
Parsing code.                          0.02
Compiling code.                        Error
Error compiling program.
Error description: Unknown member: getlist
Occurred on line: 46
l=a.GetList(mGetList)
Word: getlist
any idea what I'm missing?
 

Laurent95

Active Member
Licensed User
Longtime User

Yeah you haven't only the ICOSWorldForecastFree who has changed since the first version.
You have also this one, GetCityList for GetList.

But, you seem also a newby with B4A, otherwise you know that if you typing the dot after any instance of an object in your code, you have all the functions and properties who are accessible in a list. Even for some a pop up with sometime an example.

Then you can choose one, with mouse or arrows for navigate, and validate with a click or the "Tab" touch.
And, also, you can control if the property is correctly spelled or not
(no worries if you have the old spelling who stay or not, if you typing a dot again, you will have the list)

Good programing now.
 

microbox

Active Member
Licensed User
Longtime User

Hi Laurent95...I appreciate very much for helping me out. I got it now(compiled)...
I'm learning little by little with b4a.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, microbox I appreciate too the Laurent's help but did U see that U've also SearchCity exsample:

B4X:
Sub Globals   
 
   Dim da As ICOSForecastGetList
   Dim ed0 As EditText
End Sub



Dim s As String
    If ed0.Text.Length > 0 Then
        Try
          s=da.SearchCity(ed0.Text,"ICOSWorld Forecast Demo v3.00",True)
            If s.Length > 0 Then
          a.CityName=s
          StartActivity(Forecast)
          End If
        Catch
          ToastMessageShow(" Probably server error!! ",True)
        End Try
    End If


it's more better than GetCityList
 

Laurent95

Active Member
Licensed User
Longtime User
Hi Laurent95...I appreciate very much for helping me out. I got it now(compiled)...
I'm learning little by little with b4a.

You're welcome, it's very nice that it works for you now.
The example of Giuseppe gives you more about the library who is really useful.
B4A is also a very good tool for programming under Android, simple and complete

@Giuseppe,
Why you say it's better with the SearchCity than GesCityList ?
I ask because you know that i use it with a widget, then i can't use a function with a dialog box, otherwise i get an error.
Thanks for reply.

Best regards to all.
 

GMan

Well-Known Member
Licensed User
Longtime User
Some years ago i worked with this API with VisualBasic and wrote a little translation for the weather descriptions to German.
It was easy to adopt it, so here it is.

I call the sub after setting the CCWeatherDescription value to lb1 (Label):
B4X:
DateTime.DateFormat = "dd.MM.yyyy"
lb1.Text = a.CCWeatherDescription
WeatherTrans ' Translate


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

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Laurent, some time ago i think Dominex asked me why when He used GetList after he used FindLocation and WeaterByLocalIpAddress He got the same city from GetList.
I found the bug and fixed and that's why I implemented also SearchCity.

The bug was in List example:

Dim l as List

l.Initialize

l = getlist after this calling FindLocation and WeaterByLocalIpAddress gave the same city.
 
Last edited:

Laurent95

Active Member
Licensed User
Longtime User

Hi Giuseppe, ok for that.

For the second reply to GMan, i send you below an extract of my "French" string.xml for my widget.
That contains all translation for the weather by code of WWO, if it can help.

And emmmmm forgive me for Japanese and Chinese if i pass the hand

@GMan, thank you for sharing, now i will use it for be sure that my German translation is good

Regards.
 

Attachments

  • FrenchCodeStrings.zip
    733 bytes · Views: 195

Laurent95

Active Member
Licensed User
Longtime User
Hi Laurent, thank you so much for the translation. I hope that others send other translations.

You're welcome, just i am interrogate me with the translation of GMan.

@GMan, without abuse of your time, can i ask if you can indicate us the codes of "World Weather Online" for your translation.
I don't find several of them like :
Snowy, Stormy

Unless if i have does a mistake when i got the WWO codes.
Thanks by advance if you can do it.

For now i will build the same Sub like you but with French translation, who could help some developer.

Regards
 

Laurent95

Active Member
Licensed User
Longtime User
Some years ago i worked with this API with VisualBasic and wrote a little translation for the weather descriptions to German.
It was easy to adopt it, so here it is.

As i have say i have translated this code for French.
B4X:
Sub WeatherTrans
'  Translator CCWEATHERDESCRIPTION > FR by Laurent From the code of GMan
    If lb1.Text <> "" Then
        Select True
            Case lb1.Text.Contains("Sunny")                                            'Code 113
                lb1.Text = "Ensoleillé"
            Case lb1.Text.Contains("Clear")                                            'Code 113
                lb1.Text = "Clair"
            Case lb1.Text.Contains("Clear/Sunny")                                    'Code 113
                lb1.Text = "Clair & Ensoleillé"
            Case lb1.Text.Contains("Partly Cloudy")                                    'Code 116
                lb1.Text = "Partiellement nuageux"
            Case lb1.Text.Contains("Cloudy")                                        'Code 119
                lb1.Text = "Nuageux"
            Case lb1.Text.Contains("Overcast")                                        'Code 122
                lb1.Text = "Couvert"
            Case lb1.Text.Contains("Snowy")                                            'Not Found in codes
                lb1.Text = "Neigeux"
            Case lb1.Text.Contains("Stormy")                                        'Not Found in codes
                lb1.Text = "Venteux"
            Case lb1.Text.Contains("Mist")                                            'Code 143
                lb1.Text = "Brume"
            Case lb1.Text.Contains("Patchy rain nearby")                            'Code 176
                lb1.Text = "Pluie Légère possible"
            Case lb1.Text.Contains("Patchy snow nearby")                            'Code 179
                lb1.Text = "Neige légère possible"
            Case lb1.Text.Contains("Patchy sleet nearby")                            'Code 182
                lb1.Text = "Légère neige fondue possible"
            Case lb1.Text.Contains("Patchy freezing drizzle nearby")                'Code 185
                lb1.Text = "Légère bruine verglaçante possible"
            Case lb1.Text.Contains("Thundery outbreaks In nearby")                    'Code 200
                lb1.Text = "Orage possible"
            Case lb1.Text.Contains("Blowing snow")                                    'Code 227
                lb1.Text = "Neige poudreuse"
            Case lb1.Text.Contains("Blizzard")                                        'Code 230
                lb1.Text = "Blizzard"
            Case lb1.Text.Contains("Fog")                                            'Code 248
                lb1.Text = "Brouillard"
            Case lb1.Text.Contains("Freezing fog")                                  'Code 260
                lb1.Text = "Brouillard givrant"
            Case lb1.Text.Contains("Patchy light drizzle")                            'Code 263
                lb1.Text = "Faible bruine éparse"
            Case lb1.Text.Contains("Light drizzle")                                    'Code 266
                lb1.Text = "Faible bruine"
            Case lb1.Text.Contains("Freezing drizzle")                                'Code 281
                lb1.Text = "Bruine verglaçante"
            Case lb1.Text.Contains("Heavy freezing drizzle")                        'Code 284
                lb1.Text = "Forte bruine verglaçante"
            Case lb1.Text.Contains("Patchy light rain")                                'Code 293
                lb1.Text = "Légères pluie éparse"
            Case lb1.Text.Contains("Light rain")                                    'Code 296
                lb1.Text = "Légère pluie"
            Case lb1.Text.Contains("Moderate rain at times")                        'Code 299
                lb1.Text = "Pluie modérée intermittente"
            Case lb1.Text.Contains("Moderate rain")                                    'Code 302
                lb1.Text = "Pluie modérée"
            Case lb1.Text.Contains("Heavy rain at times")                            'Code 305
                lb1.Text = "Forte pluie intermittente"
            Case lb1.Text.Contains("Heavy rain")                                    'Code 308
                lb1.Text = "Forte pluie"
            Case lb1.Text.Contains("Light freezing rain")                            'Code 311
                lb1.Text = "Faible pluie verglaçante"
            Case lb1.Text.Contains("Moderate or Heavy freezing rain")                'Code 314
                lb1.Text = "Pluie verglaçante modérée à forte"
            Case lb1.Text.Contains("Light sleet")                                      'Code 317
                lb1.Text = "Neige fondue"
            Case lb1.Text.Contains("Moderate or heavy sleet")                        'Code 320
                lb1.Text = "Neige fondue modérée à forte"
            Case lb1.Text.Contains("Patchy light snow")                                'Code 323
                lb1.Text = "Légère neige éparse"
            Case lb1.Text.Contains("Light snow")                                    'Code 326
                lb1.Text = "Neige légère"
            Case lb1.Text.Contains("Patchy moderate snow")                            'Code 329
                lb1.Text = "Neige modérée éparse"
            Case lb1.Text.Contains("Moderate snow")                                    'Code 332
                lb1.Text = "Neige modérée"
            Case lb1.Text.Contains("Patchy heavy snow")                                'Code 335
                lb1.Text = "Fortes chutes de neige éparses"
            Case lb1.Text.Contains("Heavy snow")                                    'Code 338
                lb1.Text = "Fortes chutes de neige"
            Case lb1.Text.Contains("Ice pellets")                                  'Code 350
                lb1.Text = "Grêle"
            Case lb1.Text.Contains("Light rain shower")                                'Code 353
                lb1.Text = "Averses légères"     
                'Or "Faible pluie" the both are correct
            Case lb1.Text.Contains("Moderate OR heavy rain shower")                    'Code 356
                lb1.Text = "Averses modérées à fortes"   
                'Or "Pluie modérée à forte" the both are correct
            Case lb1.Text.Contains("Torrential rain shower")                        'Code 359
                lb1.Text = "Pluies torrentielles"     
                'Here you can't use "Averses" that not related with torrential
            Case lb1.Text.Contains("Light sleet showers")                            'Code 362
                lb1.Text = "Averses de neige fondue éparses"
            Case lb1.Text.Contains("Moderate OR heavy sleet showers")                'Code 365
                lb1.Text = "Averses de neige fondue modérés à fortes"
            Case lb1.Text.Contains("Light snow showers")                            'Code 368
                lb1.Text = "Averses de neige légères"
            Case lb1.Text.Contains("Moderate OR heavy snow showers")                'Code 371
                lb1.Text = "Averses de neige modérées à fortes"
            Case lb1.Text.Contains("Light showers of ice pellets")                    'Code 374
                lb1.Text = "Faibles averses de grêlons"
            Case lb1.Text.Contains("Moderate OR heavy showers of ice pellets")        'Code 377
                lb1.Text = "Averses modérées à fortes de grêlons"
            Case lb1.Text.Contains("Patchy light rain In area with thunder")        'Code 386
                lb1.Text = "Pluie légère éparse avec orage"
            Case lb1.Text.Contains("Moderate OR heavy rain In area with thunder")    'Code 389
                lb1.Text = "Pluie modérée à forte avec orage"
            Case lb1.Text.Contains("Patchy light snow In area with thunder")        'Code 392
                lb1.Text = "Neige légère éparses avec orage"
            Case lb1.Text.Contains("Moderate OR heavy snow In area with thunder")    'Code 395
                lb1.Text = "Neige modérée à forte avec orage"
        End Select
    End If
End Sub

It's done.
Another possibility for use with the library, and a string.xml file like i post before.
B4X:
Sub Globals
    'The instance of Giuseppe's library
    Dim weather As ICOSWorldForecastFree
    'Access to the android application resources (for the translation)
    Dim AResource1 As AndroidResources
End Sub

    Dim lblDescr As Label
    CCCode = weather.CCWeatherCode
    lblDescr.Text = AResource1.GetApplicationString("Code"&CCCode)

Of course you need to add the AndroidResources library to your project.

Regards
 

GMan

Well-Known Member
Licensed User
Longtime User
Hi GMan, thanks for this routine, I'll implements it directly in the library.
If anyone else is interested in translating into other languages, so that it becomes MultiLanguage.
Feel free to do so
In addition is here a DUTCH and a POLISH translation (ok ok, very strange languages but all of my soft (win or android or whatever) is multi-lingual, and always (beneath ES,IT,EN,DE and CN) theese two are implemented, too

1. in de Nederlandse taal:
B4X:
Sub WeatherTrans
'    Translator CCWEATHERDISCRIPTION > NL by GMAN
    If lb1.Text <> "" Then
    Select True
        Case lb1.Text.Contains("Sunny")
            lb1.Text = "Zonnig"
        Case lb1.Text.Contains("Clear")
            lb1.Text = "Helder"
        Case lb1.Text.Contains("Clear/Sunny")
            lb1.Text = "Helder & Zonnig"   
        Case lb1.Text.Contains("Cloudy")
            lb1.Text = "Bewolkt"
        Case lb1.Text.Contains("Partly Cloudy")
            lb1.Text = "Gedeeltelijk bewolkt"
        Case lb1.Text.Contains("Snowy")
            lb1.Text = "Besneeuwd"
        Case lb1.Text.Contains("Stormy")
            lb1.Text = "Atormachtig"
        Case lb1.Text.Contains("Mist")
            lb1.Text = "Floers"
        Case lb1.Text.Contains("Moderate rain")
            lb1.Text = "Matige Regen"   
        Case lb1.Text.Contains("Light rain")
            lb1.Text = "Lichte Regen"
        Case lb1.Text.Contains("Moderate rain at times")
            lb1.Text = "Matige Regen in tijden"
        Case lb1.Text.Contains("Heavy rain at times")
            lb1.Text = "Zware Regen in tijden"
        Case lb1.Text.Contains("Heavy rain")
            lb1.Text = "Zware Regenval"
        Case lb1.Text.Contains("Light freezing rain")
            lb1.Text = "Lichte aanvriezende Regen"
        Case lb1.Text.Contains("Moderate OR Heavy freezing rain")
            lb1.Text = "Matige of zware bevriezing regen"
        Case lb1.Text.Contains("Light drizzle")
            lb1.Text = "Lichte motregen"
        Case lb1.Text.Contains("Fog")
            lb1.Text = "Nevel"
        Case lb1.Text.Contains("Overcast")
            lb1.Text = "Bewolking"
        Case lb1.Text.Contains("Light rain shower")
            lb1.Text = "Lichte regen douche"
        Case lb1.Text.Contains("Moderate OR heavy rain shower")
            lb1.Text = "Matige of zware regenbui"
        Case lb1.Text.Contains("Torrential rain shower")
            lb1.Text = "Hevige regenbui !"
        Case lb1.Text.Contains("Light sleet showers")
            lb1.Text = "Lichte natte sneeuwbuien"
        Case lb1.Text.Contains("Moderate OR heavy sleet showers")
            lb1.Text = "Matige of zware natte sneeuwbuien"
        Case lb1.Text.Contains("Moderate OR heavy snow showers")
            lb1.Text = "Matige of zware sneeuwbuien"
        Case lb1.Text.Contains("Light showers of ice pellets")
            lb1.Text = "Buien ijs pellets"
        Case lb1.Text.Contains("Light snow showers")
            lb1.Text = "Lichte sneeuwbuien"
        Case lb1.Text.Contains("Moderate OR heavy showers of ice pellets")
            lb1.Text = "Matige of zware buien ijs pellets"
        Case lb1.Text.Contains("Patchy light rain In area with thunder")
            lb1.Text = "Gedeeltelijk lichte regen In gebieden met donder"
        Case lb1.Text.Contains("Moderate OR heavy rain In area with thunder")
            lb1.Text = "Matige of zware regen In gebieden met donder"
        Case lb1.Text.Contains("Patchy light snow In area with thunder")
            lb1.Text = "Gedeeltelijk lichte sneeuw In gebieden met donder"
        Case lb1.Text.Contains("Moderate OR heavy snow In area with thunder")
            lb1.Text = "Matige of zware sneeuw In gebieden met donder"
        Case lb1.Text.Contains("Ice pellets")
            lb1.Text = "Ijs pellets"
        Case lb1.Text.Contains("Heavy snow")
            lb1.Text = "Zware sneeuw"
        Case lb1.Text.Contains("Patchy heavy snow")
            lb1.Text = "Fragmentarisch zware sneeuw"
        Case lb1.Text.Contains("Moderate snow")
            lb1.Text = "Matige sneeuw"
        Case lb1.Text.Contains("Patchy moderate snow")
            lb1.Text = "Fragmentarisch matige sneeuw"
        Case lb1.Text.Contains("Light snow")
            lb1.Text = "Lichte sneeuw"
        Case lb1.Text.Contains("Patchy light snow")
            lb1.Text = "Gedeeltelijk lichte sneeuw"
        Case lb1.Text.Contains("Moderate OR heavy sleet")
            lb1.Text = "Matige of zware natte sneeuw"
        Case lb1.Text.Contains("Light sleet")
            lb1.Text = "Lichte natte sneeuw"
        Case lb1.Text.Contains("Patchy light rain")
            lb1.Text = "Gedeeltelijk lichte regen"
        Case lb1.Text.Contains("Heavy freezing drizzle")
            lb1.Text = "Zware bevriezing motregen"
        Case lb1.Text.Contains("Freezing drizzle")
            lb1.Text = "Invriezen motregen"
        Case lb1.Text.Contains("Patchy light drizzle")
            lb1.Text = "Gedeeltelijk lichte motregen"
        Case lb1.Text.Contains("Freezing fog")
            lb1.Text = "Aanvriezende Nevel"
        Case lb1.Text.Contains("Blizzard")
            lb1.Text = "Sneeuwstorm"
        Case lb1.Text.Contains("Blowing snow")
            lb1.Text = "Sneeuwbuien"
        Case lb1.Text.Contains("Thundery outbreaks In nearby")
            lb1.Text = "Donder uitbraken In het nabijgelegen"
        Case lb1.Text.Contains("Patchy freezing drizzle nearby")
            lb1.Text = "Fragmentarisch bevriezing motregen buurt"
        Case lb1.Text.Contains("Patchy sleet nearby")
            lb1.Text = "Fragmentarisch ijzel buurt"
        Case lb1.Text.Contains("Patchy snow nearby")
            lb1.Text = "Fragmentarisch sneeuw buurt"
        Case lb1.Text.Contains("Patchy rain nearby")
            lb1.Text = "Fragmentarisch regen buurt"
    End Select
    End If
End Sub

2. w języku polskim (the polish language has very funny (and ugly characters (in writing ;-) )
B4X:
Sub WeatherTrans
'    Translator CCWEATHERDISCRIPTION > PL by GMAN
    If lb1.Text <> "" Then
    Select True
        Case lb1.Text.Contains("Sunny")
            lb1.Text = "Słoneczny"
        Case lb1.Text.Contains("Clear")
            lb1.Text = "Jasne"
        Case lb1.Text.Contains("Clear/Sunny")
            lb1.Text = "Jasne i słoneczne"   
        Case lb1.Text.Contains("Cloudy")
            lb1.Text = "Mętny"
        Case lb1.Text.Contains("Partly Cloudy")
            lb1.Text = "Częściowe zachmurzenie"
        Case lb1.Text.Contains("Snowy")
            lb1.Text = "Snieżny"
        Case lb1.Text.Contains("Stormy")
            lb1.Text = "Burzliwy"
        Case lb1.Text.Contains("Mist")
            lb1.Text = "Mgła"
        Case lb1.Text.Contains("Moderate rain")
            lb1.Text = "Umiarkowany deszcz"   
        Case lb1.Text.Contains("Light rain")
            lb1.Text = "Lekki deszcz"
        Case lb1.Text.Contains("Moderate rain at times")
            lb1.Text = "Umiarkowany deszcz czasami"
        Case lb1.Text.Contains("Heavy rain at times")
            lb1.Text = "Ulewny deszcz w czasie"
        Case lb1.Text.Contains("Heavy rain")
            lb1.Text = "Ulewa"
        Case lb1.Text.Contains("Light freezing rain")
            lb1.Text = "Światło marznący deszcz"
        Case lb1.Text.Contains("Moderate OR Heavy freezing rain")
            lb1.Text = "Umiarkowany lub ciężki zamrożenie deszcz"
        Case lb1.Text.Contains("Light drizzle")
            lb1.Text = "Lekka mżawka"
        Case lb1.Text.Contains("Fog")
            lb1.Text = "Potraw"
        Case lb1.Text.Contains("Overcast")
            lb1.Text = "Pochmurny"
        Case lb1.Text.Contains("Light rain shower")
            lb1.Text = "Bezchmurnie"
        Case lb1.Text.Contains("Moderate OR heavy rain shower")
            lb1.Text = "Umiarkowane lub intensywne opady deszczu prysznic"
        Case lb1.Text.Contains("Torrential rain shower")
            lb1.Text = "Ulewny deszcz prysznic !"
        Case lb1.Text.Contains("Light sleet showers")
            lb1.Text = "Opady śniegu z deszczem"
        Case lb1.Text.Contains("Moderate OR heavy sleet showers")
            lb1.Text = "Umiarkowane lub intensywne opady przelotne śniegu z deszczem"
        Case lb1.Text.Contains("Moderate OR heavy snow showers")
            lb1.Text = "miarkowane lub ciężkie opady śniegu"
        Case lb1.Text.Contains("Opady grudek lodu")
            lb1.Text = "Opady grudek lodu"
        Case lb1.Text.Contains("Light snow showers")
            lb1.Text = "Lekkie opady śniegu"
        Case lb1.Text.Contains("Moderate OR heavy showers of ice pellets")
            lb1.Text = "Umiarkowane lub intensywne opady przelotne grudek lodu"
        Case lb1.Text.Contains("Patchy light rain In area with thunder")
            lb1.Text = "Przelotne opady deszczu w okolicy z gromu"
        Case lb1.Text.Contains("Moderate OR heavy rain In area with thunder")
            lb1.Text = "Umiarkowane lub intensywne opady deszczu w okolicy z gromu"
        Case lb1.Text.Contains("Patchy light snow In area with thunder")
            lb1.Text = "Przelotne opady śniegu W obszarze z gromu"
        Case lb1.Text.Contains("Moderate OR heavy snow In area with thunder")
            lb1.Text = "Umiarkowany lub ciężki śnieg obszarze grzmot"
        Case lb1.Text.Contains("Ice pellets")
            lb1.Text = "Granulki lodu"
        Case lb1.Text.Contains("Heavy snow")
            lb1.Text = "Ciężki śnieg"
        Case lb1.Text.Contains("Patchy heavy snow")
            lb1.Text = "Przelotne ciężki śnieg"
        Case lb1.Text.Contains("Moderate snow")
            lb1.Text = "Umiarkowany śnieg"
        Case lb1.Text.Contains("Patchy moderate snow")
            lb1.Text = "Przelotne Umiarkowany śnieg"
        Case lb1.Text.Contains("Light snow")
            lb1.Text = "lekki śnieg"
        Case lb1.Text.Contains("Patchy light snow")
            lb1.Text = "Przelotne opady śniegu"
        Case lb1.Text.Contains("Moderate OR heavy sleet")
            lb1.Text = "Umiarkowany lub ciężki śnieg z deszczem"
        Case lb1.Text.Contains("Light sleet")
            lb1.Text = "Lekki deszcz ze śniegiem"
        Case lb1.Text.Contains("Patchy light rain")
            lb1.Text = "Przelotne opady deszczu"
        Case lb1.Text.Contains("Heavy freezing drizzle")
            lb1.Text = "Ciężki zamrożenie mżawka"
        Case lb1.Text.Contains("Freezing drizzle")
            lb1.Text = "Zamrożenie mżawka"
        Case lb1.Text.Contains("Patchy light drizzle")
            lb1.Text = "Przelotne bezchmurnie"
        Case lb1.Text.Contains("Freezing fog")
            lb1.Text = "Zamrożenie mgła"
        Case lb1.Text.Contains("Blizzard")
            lb1.Text = "Zamieć"
        Case lb1.Text.Contains("Blowing snow")
            lb1.Text = "Snieżek"
        Case lb1.Text.Contains("Thundery outbreaks In nearby")
            lb1.Text = "W pobliżu ogniska burzowe"
        Case lb1.Text.Contains("Patchy freezing drizzle nearby")
            lb1.Text = "Przelotne mżawka zamrożenie pobliżu"
        Case lb1.Text.Contains("Patchy sleet nearby")
            lb1.Text = "Przelotne opady deszczu ze śniegiem w pobliżu"
        Case lb1.Text.Contains("Patchy snow nearby")
            lb1.Text = "Przelotne śniegu w pobliżu"
        Case lb1.Text.Contains("Patchy rain nearby")
            lb1.Text = "Przelotne opady w pobliżu"
    End Select
    End If
End Sub

Hier ga je & Proszę bardzo
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…