Hello,

Fluid assists with gettext in UI strings. This is great. 
Nethertheless it makes no difference between static and dynamic 
structures. For instance it creates something like:

Fl_Menu_Item menu_[] = {
 {_("File"), 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
 {_("Open"), 0,  0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
 {_("Save"), 0,  0, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
 {_("Quit"), 0,  (Fl_Callback*)cb_Quit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
 {0,0,0,0,0,0,0,0,0},
 {0,0,0,0,0,0,0,0,0}
};

The underscore is a macro to the gettext function:
#define _(text) gettext(text)

This structure is created during start up of my applications in _init() 
or likewise, much earlier before it reaches main(). main() would give me a 
chance to setup gettext to run properly. Now simply having no translation 
in the above structure would be not a huge problem. I can and do it later. 
The problem I get is, that my different applications tend to setup static 
memory different. In the end some build crash due to invalid pointers 
passed to the gettext function.

Is it proper to say creating the _() entries in the above static 
Fl_Menu_Item array is invalid?

Fltk-utf8-1.1.8, but seen since i18n support in Fluid.

kind regards
Kai-Uwe Behrmann
--
developing for colour management 
www.behrmann.name + www.oyranos.org + www.cinepaint.org

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to