Internationalizing and Localizing Applications in Oracle Solaris

Exit Print View

Updated: July 2014
 
 

X/Open catgets APIs

The X/Open catgets tools and interfaces use numbers as keys to the message catalog. Therefore, you can have different translations for the same string by using an unique numeric identifier as a key. However, source code maintenance could be an issue. For example, when an English message is updated, gettext displays the updated English message in the localized environment until the updated translations are in place. This practice helps to identify the messages that need to be updated. But, in the case of catgets, the localized environment continues to display the outdated translations unless the numeric key to the message is changed along with the updated English message.


Note -  In Oracle Solaris the catgets APIs that have been added in the X/Open standard are not commonly used. Unless compliance with the X/Open standard is required, use gettext APIs and tools.

The X/Open catgets interfaces for handling messages are as follows:

catopen()

Open a message catalog

catgets()

Read a program message

catclose()

Close a message catalog

The command-line tools used with the X/Open catgets interfaces are as follows:

/usr/bin/gencat

Generate a formatted message catalog

/usr/bin/genmsg

Extract messages from source files