Re: Gettext
- From: Matias Torres <torresmat gmail com>
- To: tvb gnome org, gtk-app-devel-list gnome org
- Subject: Re: Gettext
- Date: Tue, 03 Oct 2006 22:37:28 -0300
Tristan Van Berkom escribió:
Matias Torres wrote:
Hi all!
Yes, I know it's not a GTK question but i couldn't find an answer to
my problem.
After building my application (if it helps, it uses gtk), i use
gettext for translating it, and, in linux it works just fine. But,
talking about windows, well .. it doesn't..
Note: Gtk Widgets DO translate, but the my own text doesn't.
This is what i do:
......
#include <gtk/gtk/h>
#include <libintl.h>
......
#define PACKAGE "xiliunsystem"
#define LOCALEDIR "po"
......
void nls_init (void)
{
/* SHOULD I CALL gtk_set_locales(), WHERE? */
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
bind_textdomain_codeset (PACKAGE, "UTF-8");
}
int main ( ... )
{
nls_init ();
gtk_init (&argc, &argv);
....
return 0;
}
The message catalogs are in a subfolder in the main app dir called po
which looks something like this:
myAppDir/po/es/LC_MESSAGES/
In there there's a myapp.mo file compile with "msgfmt.EXE"
Does anybody knows what's wrong or run into this problem?
Please, Thanks and I'm sorry I'm sorry I'm sorry I'm sorry I'm sorry
i konw it's not a gtk question.
A wild guess - maybe #include <glib-i18n.h> ?
also, is all that stuff in nls_init() really needed ?
Cheers,
-Tristan
Thanks for answering, really.
About the myapp.mo to xiliunsystem.mo, well it is called
"xiliunsystem.mo" but i was trying towrite a more anonymous mail :P
And yes, the application Working Dir is ok.
Thanks anyway, i'll try that and get back to you soon.
Well.. about glib-i18n.h, i couldn't find it in my system. So i googled
it and only two results appeared which makes me think that's not the
problem. Another thing about my app is that the "intl.h".
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]