Translate messages

A globalized application should not have any language-specific text within the application code.

This language-specific text includes the following kinds of strings:
  • Strings that the application displays or writes

    Examples include error messages, informational messages, menu items, and button labels.

  • Strings that the application uses internally

    Examples include constants, file names, and literal characters or strings.

  • Strings that an user is expected to enter

    Examples include yes and no responses.

Tip: You do not need to put SQL keywords (such as SELECT, WHERE, INSERT, and CREATE) in a message file. In addition, language keywords (such as if, switch, for, and char) do not need to appear in a message file.
In a globalized application, these strings appear as references to external files, called resource files or message files. To localize these strings of the database application, you must perform the following tasks:
  • Translate all strings within the external files.

    The new external files contain the translated versions of the strings that the application uses.

  • Set the DBLANG environment variable to the subdirectory within INFORMIXDIR that contains the translated message files that the HCL OneDB™ products use.

    The INFORMIXDIR environment variable indicates the location where the HCL OneDB products are installed. You can use the rgetmsg( ) and rgetlmsg( ) functions to obtain HCL OneDB product messages. For more information about these functions, see the HCL OneDB ESQL/C Programmer's Manual.