Using gettext with a GOptionEntry
- From: Kevin DeKorte <kdekorte gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Using gettext with a GOptionEntry
- Date: Thu, 25 Jan 2007 13:57:36 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm trying to use gettext to do translation on a GOptionEntry table,
currently this works as is, but the text isn't translated.
static GOptionEntry entries[] = {
{"window", NULL, 0, G_OPTION_ARG_INT, &embed_window, "Window to
embed in", "WID"},
{"playlist", NULL, 0, G_OPTION_ARG_NONE, &playlist, "File Argument
is a playlist", NULL},
{NULL}
};
I tried this
static GOptionEntry entries[] = {
{"window", NULL, 0, G_OPTION_ARG_INT, &embed_window, _("Window to
embed in"), "WID"},
{"playlist", NULL, 0, G_OPTION_ARG_NONE, &playlist, _("File Argument
is a playlist"), NULL},
{NULL}
};
But it won't compile. Using _() works on my other strings that are in
other areas. So what is the best way to setup this entries variable and
allow it to use translation.
Thanks,
Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFFuP2g6w2kMH0L1dERAtdGAJ91xc4fZ68vhGbmkCDiIlF1Y+NAyQCfdPKi
0fktNLvU29Lksb5b3PMo71g=
=gApN
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]