Re: [gtkmm] gettext into widgets , no translation ...



Thanks, i tried that but it doesn't work :o(

curiously , it works well into labels :
login_l.set_text(_("Welcome to EasyGest. Please ...")); but doesn't work if it is a column name or a menu name , for example.

I don't understand why.


Clemens Auer a écrit :

Maybe cause of the preprocessor!?
I would try a whitespace in front of the _("foo.bar").

On Wed, 2004-07-28 at 17:13 +0200, cedric wrote:
Hello all !
I need some help with gettext ...

I've put the librairies to use gettext and the macro definitions to use the _ instead of typiing gettext all the time.
In my GUI, sometimes the translation is made but sometimes no.

...
#include <libintl.h>
#define _(String) gettext (String)
...

For example in my treeview : "Functionnalities" is not replaced by its french translation when running the program.

//Add the TreeView's view columns:
 append_column(_("Functionnalities"), modelColumns.m_col_str);

append_column( _("Functionnalities"), modelColumns.m_col_str );

Same in my menubar :
items().push_back( Gtk::Menu_Helpers::MenuElem(_("_File"), m_Menu_File) );
And into the po file :
...
#: functree.cc:20
msgid "Functionnalities"
msgstr "Fonctions"
...

thanks.

Cedric.





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