Problem with starting to translate my UI

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
delt
Earned a small fee
Earned a small fee
Posts: 24
Joined: Mon Dec 26, 2016 11:17 pm

Problem with starting to translate my UI

Post by delt » Sat Apr 22, 2017 2:11 am

...so, i have a wxTranslations *tr as member of my app class... according to the docs, the following code should look for a fr.mo file somewhere in globalprefs->userdir:

Code: Select all

  BP
  tr = new wxTranslations;
  wxTranslations::Set (tr);
  debug ("adding catalog prefix '%s'", globalprefs->userdir);
  wxFileTranslationsLoader::AddCatalogLookupPathPrefix (globalprefs->userdir);
  tr->SetLanguage (wxLANGUAGE_FRENCH);
  printf (_("test"));
  BP
...but according to strace, nothing happens between the 2 breakpoints, other than writing the debug info to stderr and "test" to stdout.

Is there something i'm forgetting?

User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Problem with starting to translate my UI

Post by eranon » Mon Apr 24, 2017 11:15 am

[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

Post Reply