Subject Re: [IBO] localization of error messages
Author Helen Borrie
At 06:41 AM 08-09-02 +0000, you wrote:
>--- In IBObjects@y..., "Maik Wojcieszak" <mw@w...> wrote:
> > I solved this problem by just catching the messages and
> > don't show them to the user.
>could you please show me how you do it ?
>Maybe one could make a better work by (also) writing the full message
>to a log file for debugging purpose.
>The user does not see itd this is good, because it could only
>confound him, but _you_ can see it, if needed.
> >I pop up an error message referring to the
> >context in wich the error occured.
>I wonder if there is a way to show/log also the .PAS filename where
>the error occurred.

There seems to be confusion about where messages come from.

If you want localization of the IBO-specific messages, why not just use the
version of ib_constants.pas for your language?

As to localization of ISC error messages (these are the ones returned from
the database) you can intercept these in the structure that is returned to
the OnError event. All you have to do is declare some constant strings of
your own to replace the English-language message that is returned. If you
want to log them, then write them to a stringlist and use the SaveToFile
method at some suitable point, to write the stringlist out to your log file.