International po file with GTK+ 2.0.6 on Windows
"Bill Nalen" <[email protected]>
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <OFDF37EAD2.BA1D1A85-ON85256C73.00236846-85256C73.0024769B@towers.com> |
Hi, I'm the maintainer of GKrellM for Windows which uses the GTK+ 2.0 stuff
from Tor's site. I just tried to enable the international stuff and ran
into a bit of a problem. I compiled the program with a switch that
includes and links against the libintl stuff. This seems to work fine.
When I run the program the OK button seems to be translated, but none of
the other program specific messages are (and they are supposed to be). I
think the problem might be with the following code:
#ifdef LOCALEDIR
bindtextdomain(PACKAGE, LOCALEDIR);
#endif
textdomain(PACKAGE);
bind_textdomain_codeset(PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
On my system localedir is not defined when compiling the code (and probably
can't be since the user can install the gtk+ files anywhere). Therefore it
falls through to the second piece which doesn't seem to turn on the text
bindings for the package (which is gkrellm in this case). I have compiled
the po file to an mo file and put it in the correct directory. I copied
the mo files for the Gimp to the gtk+ 1.3 locale directory and it works
fine.
If I comment out everything but the bindtextdomain() function and hard code
the path to my locale directory, it works. So, this leads me to believe
that not calling bindtextdomain with a specific path doesn't allow the
program to find the gkrellm.mo file it needs.
i.e changing the above to just this
textdomain(PACKAGE);
bind_textdomain_codeset(PACKAGE, "UTF-8");
bindtextdomain(PACKAGE, "c:/gtk/lib/locale");
seems to work.
Does anyone know where the default location it is looking for when the path
isn't explicitly specified? Does anyone know why it seems to find the gtk
mo file and not my specific one?
Thanks for any info.
Bill
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/