Pocket Weather

digitaldon37

Active Member
Licensed User
Longtime User
Language Support

Hi digitaldon37,

very nice work! :sign0188:

Do you also want to have it in other languages (German)?

Thanks Jotha and Fillippo for the feedback.

I don't think language support would be hard to put in. I would need to make a language file for the text that is displayed. I've uploaded the latest code (.25.1) if you want to help out with that.

[note: corrected previous version .26.1 to .25.1]
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi digitaldon37,

I just downloaded your last code.
In the source the version is 0.25.1.
But in your post it is supposed to 0.26.1
Is it a typo or an older version ?

If you are intersted in a version, I would do the translation.

Best regards.
 
D

Deleted member 103

Guest
Hi digitaldon37,

I've added a few menu.
The DLL, you need to add but also because otherwise it on the PPC does not work.

PS. I hope you understand my English-Google.

Ciao,
Filippo
 

digitaldon37

Active Member
Licensed User
Longtime User
Hi digitaldon37,

I've added a few menu.
The DLL, you need to add but also because otherwise it on the PPC does not work.

PS. I hope you understand my English-Google.

Ciao,
Filippo

Nice addition on the menu! The version in the source code is correct (.25.1) - I will update the post.
 

digitaldon37

Active Member
Licensed User
Longtime User
Hi digitaldon37,

I just downloaded your last code.
In the source the version is 0.25.1.
But in your post it is supposed to 0.26.1
Is it a typo or an older version ?

If you are intersted in a version, I would do the translation.

Best regards.

Thanks Klaus. The correct version is .25.1. Would you be putting these into some sort of text file ("language.txt") that we can load at run-time?
 

klaus

Expert
Licensed User
Longtime User
In my programs I use simple text files. I have a language index, depending on the selected language, and load the right file.
The file content is loaded into a Text array and in the program I use these varaibles with their index instead of direct text like.
Label1.Text = text(11) instead of
Label1.Text = "File:"
In the text files the 11th entry is for example "File:", "Fichier:" "Datei:" and so on depending on the language.
The possible languages are predefined and if the file for the given language does exist, the choose is enabled or disabled. To add a new language file the user can translate one of the existing files and change the last letter. The predefined languages in my programs are:
English, French, German, Italian, Spanish, Portuguese, Russian and Japanese. The Japanese translations came from alfcen. See attached picture.
For example for the DynSim (Dynamic Simulations) program there are the files, DynSimE.txt, DynSimF.txt, DynSimD.txt and DynSimI.txt, the others don't exist yet. The last letter gives the language.
E English, F French, D German, I Italian, S Spanish, P Portuguese, R Russian and J Japanese.

I have also help files, in different languages, for some of my programs, but less than for the text files. If, for a given language the text file does exist but not the help file, the english version is loaded by default.

The language index is saved in an Init file (Ex: DynSim.ini), that is always saved when leaving the program and loaded at start up so the user gets the last setup.

Best regards.
 

Attachments

  • Setup.jpg
    Setup.jpg
    17 KB · Views: 279

digitaldon37

Active Member
Licensed User
Longtime User
Language Support

In my programs I use simple text files. I have a language index, depending on the selected language, and load the right file.
The file content is loaded into a Text array and in the program I use these varaibles with their index instead of direct text like.
Label1.Text = text(11) instead of
Label1.Text = "File:"
In the text files the 11th entry is for example "File:", "Fichier:" "Datei:" and so on depending on the language.
The possible languages are predefined and if the file for the given language does exist, the choose is enabled or disabled. To add a new language file the user can translate one of the existing files and change the last letter. The predefined languages in my programs are:
English, French, German, Italian, Spanish, Portuguese, Russian and Japanese. The Japanese translations came from alfcen. See attached picture.
For example for the DynSim (Dynamic Simulations) program there are the files, DynSimE.txt, DynSimF.txt, DynSimD.txt and DynSimI.txt, the others don't exist yet. The last letter gives the language.
E English, F French, D German, I Italian, S Spanish, P Portuguese, R Russian and J Japanese.

I have also help files, in different languages, for some of my programs, but less than for the text files. If, for a given language the text file does exist but not the help file, the english version is loaded by default.

The language index is saved in an Init file (Ex: DynSim.ini), that is always saved when leaving the program and loaded at start up so the user gets the last setup.

Best regards.

Thanks! That would be great since you've already got those routines. I am not making any changes at the moment so please use the latest source in post #1 (25.1) and then we'll use that as the next release.
 

klaus

Expert
Licensed User
Longtime User
The multilanguage version V0.26 is ready.
Can you transfer it to your 1st post.

I have also added Filippo's menus.

In looking deeper in your code I have two suggestions.

1. On several places when you you set the Visible property to False you set also the Enabled propperty to false. You don't need to set both to False. When setting Visible to False the Control is not available.

2. For the images on the main window you have around the images 4 Labels for the border. One label would be enough, with the outer dimensions 4 pixels wider. I changed it for the upper left image.

Perhaps I have missed some texts, please let me know or you can add them.

@JOTHA: Könntest Du mal die Deutschen Texte durchschauen und eventuelle Verbesserungen durchführen.
Schon mal Danke im Voraus

@Filippo: la versione in Italiano ?

Best regards.
 
Last edited:

digitaldon37

Active Member
Licensed User
Longtime User
The multilanguage version V0.26 is ready.
Can you transfer it to your 1st post.

I have also added Filippo's menus.

Great! I am going to give this a quick test and upload to the main post and over at xda-developers

In looking deeper in your code I have two suggestions.

1. On several places when you you set the Visible property to False you set also the Enabled propperty to false. You don't need to set both to False. When setting Visible to False the Control is not available.

Thanks. That would make it easier and reduce the chances of me forgetting to re-enable elsewhere.

2. For the images on the main window you have around the images 4 Labels for the border. One label would be enough, with the outer dimensions 4 pixels wider. I changed it for the upper left image.

I know it was probably bad practice on my part, but I was experimenting of how to use a GIF for the weather status, and still allow a background form image to show through and still have borders. (though it's not coded for this - this is why I was asking about controls that have transparency in one of the other threads) Hard to explain so I'm uploading a mock-up image

Perhaps I have missed some texts, please let me know or you can add them.

@JOTHA: Könntest Du mal die Deutschen Texte durchschauen und eventuelle Verbesserungen durchführen.
Schon mal Danke im Voraus

@Filippo: la versione in Italiano ?

Best regards.

I'll look it over - again Thanks! :)
 

Attachments

  • background.JPG
    background.JPG
    19 KB · Views: 294
D

Deleted member 103

Guest
Hi digitaldon37

@Filippo: la versione in Italiano ?
as requested by Klaus ...


Ciao,
Filippo
 

Attachments

  • WeatherI.txt
    603 bytes · Views: 323

JOTHA

Well-Known Member
Licensed User
Longtime User
@JOTHA: Könntest Du mal die Deutschen Texte durchschauen und eventuelle Verbesserungen durchführen.
Schon mal Danke im Voraus

Das mache ich gerne.

Nur in den nächsten 3 Tagen kann ich das höchstens mal in einer "Nachtschicht" machen.

Mein Vater ist heute vor 2 Stunden überraschend gestorben.
 

digitaldon37

Active Member
Licensed User
Longtime User
Version .27

Latest version has language support

.27 (11/21/08)
=========================================
- Added menu bar (Thanks Fillipo!)
- Added language support (Thanks Klaus!)
- organized code into Regions

Thanks to everyone's feedback & contributions!
 

Cableguy

Expert
Licensed User
Longtime User
While translating the English file to Portuguese, I found these typos:

Tomoorow, should be Tomorow
Waether upate, should be Weather Update

In my file I have a Word that perhaps is too big for the localization on the app...
Configurações' If this is too long just use "Config"


PS. How do I find my location code..I went to yahoo, set my location and copy what I thought to be my location code..
PORTUGAL-MATOSINHOS, but I got SION on the app...
Got this working, I would have swornned that I entered the exact same location code before...
Well this time, due to the BUG posted below, I entered the code directly in the ini file and it works...
BUG::In my quest to "Guess" mylocation I rendered the app useless, as I entered an invalid location (zip-Code) in the location field...
To make it run again I had to edit the ini file and delete my previously entered value inthe locations...
 
Last edited:

digitaldon37

Active Member
Licensed User
Longtime User
While translating the English file to Portuguese, I found these typos:

Tomoorow, should be Tomorow
Waether upate, should be Weather Update

In my file I have a Word that perhaps is too big for the localization on the app...
Configurações' If this is too long just use "Config"


PS. How do I find my location code..I went to yahoo, set my location and copy what I thought to be my location code..
PORTUGAL-MATOSINHOS, but I got SION on the app...
Got this working, I would have swornned that I entered the exact same location code before...
Well this time, due to the BUG posted below, I entered the code directly in the ini file and it works...
BUG::In my quest to "Guess" mylocation I rendered the app useless, as I entered an invalid location (zip-Code) in the location field...
To make it run again I had to edit the ini file and delete my previously entered value inthe locations...

I have uploaded .28.1 which is a bug fix that may help with some of the location problems. If the program has a bad location code it should default to location 1, and if that is bad it should default to "77095" so you can go back into the location editor and fix it. At least that is how I tried to program it to act.
 

klaus

Expert
Licensed User
Longtime User
Hi Paulo,

To get the code for your location you can do it directly in the program.
In the main menu go to Locations.
In the locations window, click on one of the Add checkboxes.
Then you will see comboboxes where you can select your location and click on the save button.
Then you come back to the location window and there you will see your code. Click on the Save button.
Then you will see the weather in your area.

The pictures below shows it.

In getting the location Sion, at least you saw the weather in my area. It's snowing right now.

Best regards.
 

Attachments

  • Weather0.jpg
    Weather0.jpg
    21.6 KB · Views: 273
  • Weather1.jpg
    Weather1.jpg
    17.9 KB · Views: 274

klaus

Expert
Licensed User
Longtime User
Hi digitaldon37,

There are still some problems with the multilanguage.
- I missed one text
- The short date on the bottom of the main window is in English
- The weather condition text on the 2nd window is also in English

The last two ones come directly from the RSS message submitted by Yahoo.

I will have a look ,the next days, if and how this could be improved.

Best regards.
 

digitaldon37

Active Member
Licensed User
Longtime User
Version .30

I have uploaded developer version .30 to the main post. Changes include

1. Replace "radio button" navigation with menu navigation
2. Current and forecast details page has been updated
 

klaus

Expert
Licensed User
Longtime User
Hi digitaldon37,

I have updated the language support for the actualisation date.
The weather condition text is still in english. There are more different texts than images so it is almost impossible to translate those without having the whole set.
I tried to read the html file coming back form sites like these:
Sion Prvision Yahoo! Mto
Sion Wetter Vorhersagen - Yahoo! Wetter
Meteo Sion | Previsioni del tempo - Yahoo! Meteo

But there doesn't exist such sites for each language. And the special characters are not displayed correctly.

I played also a bit with themes.

Best regards.

What about something like this
 

Attachments

  • Sky0.jpg
    Sky0.jpg
    27.2 KB · Views: 273
  • Sky1.jpg
    Sky1.jpg
    27.6 KB · Views: 285
  • Route66.jpg
    Route66.jpg
    24.9 KB · Views: 266

digitaldon37

Active Member
Licensed User
Longtime User
Hi digitaldon37,

I have updated the language support for the actualisation date.
The weather condition text is still in english. There are more different texts than images so it is almost impossible to translate those without having the whole set.
I tried to read the html file coming back form sites like these:
Sion Prvision Yahoo! Mto
Sion Wetter Vorhersagen - Yahoo! Wetter
Meteo Sion | Previsioni del tempo - Yahoo! Meteo

But there doesn't exist such sites for each language. And the special characters are not displayed correctly.

I played also a bit with themes.

Best regards.

What about something like this

How did you get the background to work?

I've added a couple of changes and uploaded version .31 to the main post.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi digitaldon37,

The picture is directly put in the Form1.Image.
The lines and the texts are drawn onto the forelayer of the form with
a DrawerEx object from the ImageLibEx.
It could have been done directly with Form1.FLine and Form1.FDrawString.
But I use right alignment for some texts, and for that I need the StringWidth function that is in the ImageLibEx library with the DrawerEx object.

I am also looking to replace the menus by ToolBars.

When I am almost finished I will post it.

Best regards.
 
Top