Forum > Translations

.PO file location / Portable Applications

<< < (2/2)

lainz:
You're using Windows? The problem is the path!

Use 'other\languages\' instead 'other/languages/'

See the attached project.

TheBlackSheep:

Hi Lainz

thanks for the demo - it turned out it wasn't the path that was incorrect. Your demo application did nevertheless indicate what was wrong with my project. 

The DefaultTranslator method automatically translated the captions of things like buttons and menu items whereas with the other method you have to set them all manually in a resource file.  The application I've been developing is a WinXP toolbar icon one and so the menu's, labels, buttons and forms etc. I was seeing weren't being changed in the TranslateLCL method but were being changed when using the DefaultTranslator unit instead (I just hadn't noticed this).  The TranslateLCL was working fine for things like messagedlg's - basically all the entries in the resourcestring unit  - but I hadn't used the application to a point where these were visible.

I suppose it might make sense to modify the DefaultTranslator to have an optional path rather than the pre-defined one's it has currently or I go through all the forms, menu's, labels and buttons and set these up in the resourcestring unit as well and define them in the create event of the form. 

Are there advantages of doing translations via the "official" method of TranslateLCL over the "unofficial" DefaultTranslator method?

TheBlackSheep

Navigation

[0] Message Index

[*] Previous page

Go to full version