On Tue, 12 Dec 2006 20:04:01 +0200 "George Birbilis" <[EMAIL PROTECTED]> wrote:
> > But therefore need access to all Forms in the current opened > > Laz-Project inside the IDE. How can i solve this Problem. > > Delphi had OpenTools API. Maybe Lazarus IDE has similar? IDEIntf > > > Has someone any tips i could do that ? > > Are some Prople interested in having such a translation tool > > inside Lazarus ? > > Problem is how you would catch up with newer versions of Lazarus. > Your tool would need to be in source form maybe and people would > reinstall the package with every new version of the IDE (or it could > come with the IDE as built-in if it's good enough) > > > 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. > > I'd like that too. Calling it from inside the IDE as an external tool > might also do the job, if the tools actions have an option to save > project before calling the external tool and have special vars like > in Delphi to pass to the command-line of the called external tool See http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames > > > Or is it better to make a component with a component editor to do > > it ? > > The loader of the translations could be a component so that one could > do MUI (multi-user interface) like GUIs and switch language at > runtime on the fly (localization used in FPC/Laz doesn't usually work > that way I think, but you statically compile the language so you have > many executables/libs, not a single one with resource dlls, but I > might be wrong on it) Both is possible. About on-the-fly: Once a string is used, you don't know, where. So, it is not possible to change the language automatically, without writing additional code. > > There i have the next problem. I know how to create > > Components but i don't know how to create a component-editor... > > Are they like in Delphi? If so, can sent you examples of mine Pretty much. See ideintf/componenteditors.pas for examples. > > 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. > > Indeed an XSL transform would be nice to make .po etc. Could produce > borland translation files maybe too someday > > > Should i use one file per Language or is it better to have > > one big file for all languages. > > Per language is better I feel > > See below for some more stuff on localization: > > ----------- reply on this list: > > > Is there any document/help on how to localize (or even > > better internationalize [have it dynamically load the > > correct localized resources]) > > the Lazarus IDE and Lazarus apps in general? > > > > In Delphi you use resourcestring (I see Lazarus/FPC also > > accepts > it), > > but not sure how to use that without the Delphi ITE (the > translation > > editor & related wizards) and if Lazarus works exactly the > > same > way > > George, > > You can see how it's implemented in > ./lazarus/ideidetranslations.pas. The FPC documentation is an excelent > reference : > > http://community.freepascal.org:10000/docs-html/prog/progch9.html#x204-20800 > 09 > > HTH Darius > > > ----------- following is from FPC or Laz online docs I think: > > Quick Start for translators: > > For example finnish translation: > Search for all *.fi.po files. They are simple text files, with an easy > format. > Edit them with programs like kbabel. > Run 'sh localize.sh' to update translations. > > Send the updated xxx.fi.po files to [EMAIL PROTECTED] > Do not send diffs for .po files. > > > Now the background: > > The <lazarusdir>/languages directory contains all the stuff for > internationalization of the lazarus IDE. > > There are a few other directories for the codetools and the lcl. They > work all the same. All language files can easily be updated with the > <lazarusdir>/localize.sh or <lazarusdir>\localize.bat script. > > > All text and messages used in the IDE (except the special designer > units) should be placed into the unit lazarusidestrconsts.pas. This > unit uses a resourcestring section, so that the compiler will create > the <lazarusdir>/lazarusidestrconsts.rst file. > Since this is a fpc-only format it must be converted with the rstconv > program: > > cd <lazarusdir>/languages > rstconv -i ../lazarusidestrconsts.rst -o lazaruside.po > > Hint: this is done by <lazarusdir>/localize.sh or > <lazarusdir>\localize.bat. > > This will create the file lazaruside.po, which should be translated > in all required languages to a lazaruside.xx.po file. For the xx see > the gettext unit in the procedure TranslateResourceStrings. > > german: lazaruside.de.po > russian (KOI8-R): lazaruside.ru.po > spanish: lazaruside.es.po > french: lazaruside.fr.po > italian: lazaruside.it.po Sounds familar. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
