On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote:

But the 'current translation' is simply the value of the resourcestring, so
you should not need to look it up ?

How?

I'm trying to detect this specific exception

      raise EInvalidOperation.Create(sCannotFocus);

(where sCannotFocus is defined in LCLStrConsts).

I tried

  if E is EInvalidOperation then
     if E.message=sCannotFocus

but it doesn't work (sCannotFocus holds the original, not the translated, string).

Seems like Lazarus is not using the regular resourcestrings then, because
the whole point of using resourcestrings is that their value is the
translated value...

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to