Translation for standard dialog buttons? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Translation for standard dialog buttons?

Post by MortenMacFly »

Hi all,
I am using Poedit to translate my application. It works fine so I do not have issue with Poedit in the first place. Hence, I am using standard dialogs like wxStdDialogButtonSizer. The labels of these buttons do not appear in the translation catalogue. This is kind of expected as these labels also do not appear in the source code:

Code: Select all

  sdsOkCancel = new wxStdDialogButtonSizer();
  sdsOkCancel->AddButton(new wxButton(this, wxID_OK));
  sdsOkCancel->AddButton(new wxButton(this, wxID_CANCEL));
  sdsOkCancel->Realize();
It might be a stupid question, but what do I have to do to translate these strings?
Thanks!
Morten.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Translation for standard dialog buttons?

Post by doublemax »

You also have to add the wxWidgets catalogs for the languages you want to support. They're in <wxdir>/locale/
Use the source, Luke!
MortenMacFly
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 09, 2006 8:13 am

Re: Translation for standard dialog buttons?

Post by MortenMacFly »

doublemax wrote: Sun Oct 24, 2021 3:48 pm You also have to add the wxWidgets catalogs for the languages you want to support. They're in <wxdir>/locale/
Thanks for the answer! That is very helpful!

(And sorry for the late reply... somehow the emails from this forum don't make it into my postbox... I'll check why that is.)
Post Reply