Re: i18n problem



On Sun, 25 Jul 2004 15:51:54 -0300
John Coppens <john jcoppens com> wrote:

Hello people.

Since a few weeks, I put a Smith Charting program on the 'net, and when
a few users wanted to translate, I added i18n support to the program.
Everything goes fine, except for a few strings... Could someone indicate
me where the problem is?

I declared:

typedef struct {
  char *hdr;
  int w;
} loaddef[] = {
  {N_("F (MHz)"), 60},
  {N_("Real"),    50},
  {N_("Imag"),    50}
};

And later in the program, I used:

    col = gtk_tree_view_column_new_with_attributes(
                _(loaddef[def].hdr),
                renderer, "text", def,
                NULL);

That seemed quite straightforward, but the title are not translated for
some reason.

Ideas?
John

Problem solved - it was really a Glade issue - as far as I can see, never
mentioned in the manuals:

Each source file - with translatable strings - has to contain:

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

at the beginning.

John



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