Thanks Mattias,

I will seek that, if somebody has more information…

Laurent,

2007/7/13, Mattias Gaertner <[EMAIL PROTECTED]>:

On Fri, 13 Jul 2007 11:42:38 +0200
wile64 <[EMAIL PROTECTED]> wrote:

> Hello,
> Exist there tools to create resourcestrings since Form?

No.

But Vasily started something like this, although I'm not sure about
the state.
Compile clean with -dTRANSLATESTRING.
AFAIK it creates an .lrt file for each saved form (.lfm). Somehow a .po
file is created. Then a .mo file must be created for each
translation. And the LCL will somehow load them to translate strings
during loading.
Maybe someone else can give more details.


Mattias


>
> Laurent
>
> 2007/7/13, Mattias Gaertner <[EMAIL PROTECTED]>:
> >
> > On Fri, 13 Jul 2007 10:34:33 +0200
> > Luk Vandelaer <[EMAIL PROTECTED]> wrote:
> >
> > > On Thursday 12 July 2007 23:40, A.J. Venter wrote:
> > > > Moreover this is clearly not an ideal setup for them since the
> > > > grammer would require the username to be elsewhere in the
> > > > sentence sometimes (how do I handle that), and there is the
> > > > even more complex part where I need to set a number of captions
> > > > for a different form out of this unit later on:
> > > >
> > > > TrayIcon1.Hint := IntToStr(Units)+' Units remaining';
> > > >   Popup1.Caption := IntToStr(Units)+' Units remaining';
> > > >   Popup1.Panel1.Color := RGBToColor(227,108,42);
> > > >   Writeln(Units);
> > > >   Popup1.TextY.Caption := 'Welcome user
> > > > '+LoggedInUser+LineEnding; Popup1.TextY.Caption :=
> > > > Popup1.TextY.Caption+'You have '+IntToStr(Units)+' time units
> > > > left'+LineEnding;
> > > >
> > > > All of that should obviously ALSO be translated.
> > > >
> > > > How do I do that part please ?
> > >
> > > By using the Format function. For example:
> > >
> > > resourcestring
> > >   rsWelcomeMsg =
> > >     'Welcome user %s'+LineEnding+'You have %d time units left';
> > > ...
> > >  Popup1.TextY.Caption :=  format(rsWelcomeMsg, [LoggedInUser,
> > > Units]);
> > >
> > > A translation in Dutch could then be
> > > 'Welkom, je hebt nog %1:d tijd eenheden over, %0:s.'
> > > which has the order of the parameters switched.
> >
> > To create such resourcestrings easily you can use Tools > Make
> > Resource String'. For example
> >
> > Popup1.TextY.Caption := 'Welcome user '+LoggedInUser+LineEnding;
> >
> > Place the cursor on the string 'Welcome' and execute the tool.
> >
> > See
> >
> >
http://wiki.lazarus.freepascal.org/index.php/IDE_Window:_Make_ResourceString
> >
> >
> > Mattias
> >
> > _________________________________________________________________
> >      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




--
Laurent.
--------------------------------------------------------------------------------------------
My Web : http://wile64.neuf.fr/
French Forum : http://lazforum-fr.tuxfamily.org/index.php

Reply via email to