Sweep [Home] [Tutorials] Hosted at SourceForge

Developing Sweep Plugins

PreviousContentsNext

Internationalisation

Sweep includes support for translatable strings via GNU gettext [3]. It uses the same macros that the Gnome project defines to mark out strings which can be translated.

When writing a plugin, you will provide some text strings describing the plugin's procedures, the names of parameters used, and short descriptions of the paramters meanings. In order to enable translators to provide complete translations of Sweep and its plugins in other languages, you must specifically mark strings which should be translated.

The usual way to do this is to place the macro _(...) around any strings used within the code. However, when the string appears outside of a function, you must use the macro N_(...) instead. N(...) marks a string for later translation; _(...) marks a string for immediate translation, and can only be used where a function call is permitted.

For more detailed information on the use of these macros, see the relevent section in "GTK+/Gnome Application Development" [4].

PreviousContentsNext

Copyright © 2000 Conrad Parker.