[fxruby-users] i18n messages

Joey Kinsella jkinsella at ancillaryservices.com
Wed Apr 28 09:23:31 EDT 2010

This was an interesting question, what it looks like happens (atleast for
FXPrintDialog) is use the FXTranslator object.

--- C++ snippets ---

/* FXPrintDialog.cpp */
FXGroupBox *dest = new FXGroupBox(contents, tr("Print Destination"),
10,10,5,5 10,5);

---- Looking through the tr() functions appears to do this: ---

/* FXWindow.cpp */
const FXchar *FXWindow::tr(const FXchar *message, const FXchar* hint) const
  FXTranslator *translator = getApp()->getTranslator();
    return translator->tr(getClassName(), message, hint);
  return message;

--- Translator tr() ---

/* FXTranslator.cpp */
const FXchar *FXTranslator::tr(const FXchar* context,const FXchar* message,
const FXchar* hint) const {
  FXTRACE((200,"tr context '%s' message: '%s' hint:
  return message;


Ok, so looking through that it doesn't seem to actually map anything...
(This was fox-1.6.35 source code.)
So, I'm not really sure how to do translations on const values. Someone with
more experience in the Fox/FXRuby libraries might be able to guide you
though. Glancing through the FXRuby source I don't see anything additional
or different being done for the FXTranslator object. but that's just a
glance.. Further investigation could yield something else.

I hope this helps in some way.


2010/4/28 Bartosz Dziewoński <matma.rex at gmail.com>

> I don't think that's what Reginaldo meant.
> > constant messages (texts of buttons and labels of a FXPrintDialog, for
> example)
> (I don't know how to do it myself, just pointing out)
> --
> Matma Rex - http://matma-rex.prv.pl/
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users

If you are not the intended recipient, you are hereby notified
that any dissemination, distribution, copying or other use of
this communication is strictly prohibited.  If you have
received this communication in error, please notify us

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100428/95100ca0/attachment.html>

More information about the fxruby-users mailing list