RE: `_' undeclared (first use this function) ??



Hi,

Basically anything that has _("some string") means that "some string"
can be translated into language "x", given that someone has translated
it for language "x" and that language "x" is specified/set in the
environment before running the code.

_() is a function supplied by GNU gettext, for more information see:
http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC6

This is also supported by Gnome, for developer information:
http://developer.gnome.org/arch/i18n/

For languages supported by gnome:
http://www.gnome.org/i18n/

If you use libgnome in your build and #include <libgnome/gnome-i18n.h>
it should fix this problem.

If you do not use libgnome and do not want to use it, set up your own
pre-processor definition to get around it:

        #define _(String) (String)

I'm sure GNU's gettext is used by Glib (which is used by GTK) and so
libgnome need not be utilised at all, but I haven't looked into this.

Regards,
Martyn

-----Original Message-----
From: gtk-app-devel-list-admin gnome org [mailto:gtk-app-devel-list-
admin gnome org] On Behalf Of Kang, Michael
Sent: 20 April 2004 14:07
To: Gtk Mailing List (E-mail)
Subject: `_' undeclared (first use this function) ??

Hi,

I got a compile error on the following function call.
      gtk_entry_set_text (GTK_ENTRY (combo_entry1), _("WinPst
Desktop"));

I could not find the defination of _(), and I can not search it on
google.
What is that? How can I get rid of the error?

Thanks in advance,

Michael




_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]