Getting rid of .mo catalog files (MSW only)

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Getting rid of .mo catalog files (MSW only)

Post by cpp »

The one thing i dont like about wxWidgets, is that i have to distribute .mo catalog files if i want my app in any language other than english, this might be normal in linux (i dunno anything about linux), but one of the few good things about msw is its resource system. To be honest, i nearly gave up on wxWidgets because of this (i need 1 .exe file only apps). So i came up with this solution, (needless to say, it only works for MSW) it requires you to ADD this code to the intl.h and intl.cpp files of you wxWidgets sources, and (yes, im affraid so) recompile the whole library. Idid this myself and everything compiles fine in VS.NET 2003, and my apps work fine.
THIS ASSUMES YOU ARE USING wxWidgets 2.62 for MSW!
Instructions:

1.- open the file intl.h under $(WXDIR)\include\wx, and add this code, BE CAREFULL TO ADD IT IN THE PROPER PLACE!

----- near the start where it sais global decls

Code: Select all

// ---------------------------------------------------------------------------
// wx_LANGCAT_RESOURCE_TYPE: type of resource 
// wxLocale::AddCatalogFromRc() will look for in the apps module.
// if you use this feature, make shure you specify this type of
// resource for catalogs in your app
Hier Kommt die Sonne...
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

Why don't you make a class that is derived from wxLocal?
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp »

Thanks for reading (part of) the post. :D
Why don't you make a class that is derived from wxLocal?
the answer lies about 8 inches above your post :wink:
Hier Kommt die Sonne...
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

cpp wrote:Thanks for reading (part of) the post. :D
Why don't you make a class that is derived from wxLocal?
the answer lies about 8 inches above your post :wink:
:oops: I missed that part...
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

the answer lies about 8 inches above your post
Isn't that relative to the DPI and size of your monitor / screen resolution ? :lol:

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

Jorg wrote:
the answer lies about 8 inches above your post
Isn't that relative to the DPI and size of your monitor / screen resolution ? :lol:

- Jorgen
I don't know how much one inch is (in cm ;))
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp »

Terribly sorry! my mistake. It should have been:

The answer lies 8 inches above your post (considering a 17" LCD monitor at 1024 x 762 resolution. :lol: :lol:
Hier Kommt die Sonne...
Post Reply