Back
Home
Up

Messages file.

    Since version 4 at least, Interbase includes a file in binary format, with messages that the client library and the command line utilities use to communicate with the user. This file has the name interbase.msg and it's created from a GDB in the build process of the engine itself.

    The objective of this file is twofold: it avoids the need to hardcode messages in the utilities and client library and it allows the contents to be ported to another language, namely, to localize the messages. There are some commercial tools to do this task.

    In the IB API call to connect to a database (isc_attach_database), there's a DPB to specify the name of the messages file that the client library will use, so in theory you can have several files with the "msg" extension and select one of those at connection time. In practice, this connection option doesn't work, so you'll need to rename your translated file as "interbase.msg" for it to work and put it in place of the original. An IBO user, Leos Urban, was able to make the translated messages file to work without replacing the original. The steps are:

  • Use the INTL directory under the main Interbase directory (because this is the location used for internationalization) to put your translated file that we'll call new.msg for now.
  • Set environment variable LC_MESSAGES to new, without extension.
  • Set it before you run the application because this environment variable is read when the client library is loaded.

Of course, the problem with this approach is that it will work for each user, but it defeats the supposed flexibility that the failed API parameter gives you, where each attachment can have its own distinct version of the messages file even for the same user. Environment variables should be an option, not the unique way to proceed.

 

This page was last updated on 2001-02-16 00:12:23