Your gettext problem

Hi Carlos,

I looked at your test program and found a bug in it - after fixing the bug,
everything works fine.

- in, you need to set TEST_LOCALEDIR to the directory where it
  actually installes your *.mo files - normally $(datadir)/locale

- in the main() function of your program, you must call

        setlocale (LC_ALL, "");
        bindtextdomain (PACKAGE, TEST_LOCALEDIR);

- you need to define `_' to use dgettext for your own strings, not gettext -
  like this: #define _(String) dgettext(PACKAGE, string).

  [FIXME: not 100% sure about this, but this made it work for me].

Martin Baulig
martin gnome org (private)
baulig suse de (work)

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