Alexander Shopov wrote: >> The context is stripped when the string is *used*, for >> marking it is irrelevant whether it has context or not, so >> mark it normally with N_(). > I am sorry but this does not work. > > When I mark strings simply with N_() the context information is not > stripped away - in fact the original string in English gets shown *with* > the context info - no translation gets shown even though the string is > translated.
You need to mark the strings in the static initialiser using N_() only, and then when you actually *use* the strings, use Q_() to do the translation while stripping the context. So something like this should work: { static const char *stuff[] = { N_("Button label|I like strings"), N_("Menu label|This is another string"), NULL, }; int i; for(i = 0; stuff[i]; ++i) printf("Translated string is: %s\n", Q_(stuff[i])); } -brian _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list