Hi Tanila,

I would like to write an app that takes all Forms and Datamodules of a
Lazarus Project.
I played arround with gnu gettext and the supported features in Lazarus.
Everything is very fine but i would like to have a more useful and
flexible solution.

I actually played with something similar some time ago.

This app should generate a file with all Components that have
TranslateStrings-Properties in it, which then can be translated by the
translators.

But therefore need access to all Forms in the current opened Laz-Project
inside the IDE. How can i lolve this Problem.

I made a unit that links in the project and loads all resourcestrings from an XML file and writes all resourcestrings back to the XML file when it cannot find it. Just running the application is enough to update the XML file.

Has someone any tips i could do that ?
Are some Prople interested in having such a translation tool inside
Lazarus ?

I am, and I'm willing to donate the code to act as startingpoint. The code actually worked, only thing left was to make it into a component and optimize for speed. It's actually somewhat sloooooww. :)

I could generate the file by runtime too, if the translation-file isnt
existend, but i would like to have it as a seperate tool inside the IDE
of Lazarus.
Or is it better to make a component with a component editor to do it ?
There i have the next problem. I know how to create Components but i
don't know how to create a component-editor...

I think creating the XML file at runtime is a more straightforward approach. When doing it at designtime you could use codetools.

What is the best format to store the Translation File. I don't know if i
should use XML. Maybe it's senseful to make it transform to a po file to
make it possible to edit by poEdit or similar applications.

You could consider using several output formats by overriding the base class, that's what's oop is all about after all!

Should i use one file per Language or is it better to have one big file
for all languages.
For speed I guess you could go with multiple files. In my implementation I used one XML file. Just do some tests as soon as you have something.

Darius


Sorry... so many words to read...

thx in advance for all your tipps

Tanila

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to