Search code examples
linuxgcclocalizationinternationalization

MC (Microsoft's Message Compiler) replacement for Linux GCC


What is the equivalent mechanism in Linux GCC for the message compiler in Windows VC++?

What I need to do is to be able to have localized messages with the same ID for each message in all languages, then to "compile" the messages so the general code compiler will take the message according to the language specified.

For example, I work in Windows with messages from this structure:

MessageId=100

SymbolicName=ID_GENERAL_ERROR

Language=English

General error.

Within my C++ code I just use ID_GENERAL_ERROR, and when I compile the messages file I set the language I want. (Actually I use the MC compiler to generate a header file that contains the messages in the selected language).

Is there a common way to do so in Linux\ GCC?

Thank you in advance.


Solution

  • This is not specific to gcc, have a look at gnu gettext which is the natural tool for linux.

    http://www.gnu.org/software/gettext/manual/gettext.html