Multiple language support

Hello,
first i'm not a native speaker so please excuse my unprofesssional English. I'm developing an application with wxwidgets and c++ which has to support multiple languages. I've tried to realize this through a dll for each language but I just want one single executable( because of various reasons ). Now I came across resource files to store the strings for the prevailing language but I cant understand the advantages of resource files compared to hard coded strings( large vector or array ). Is it just another level for abstraction or are there any differences in storing? Or am I on the wrong way for multiple language support?

Thanks you for your help in advance
gbatt
You mentions DLL, so are you talking about a Windows specific application?

The advantage of storing strings as resources in either an executable or DLL, as opposed to constant strings compiled into code is that you can use a resource editor to replace the strings in the executable module directly (without rebuilding the binary.) This is advantageous if you want to support a lot of languages as you do not have to rebuild your app zillions of times.

You can also load resource from another module. When you follow this approach, you end up with a resource DLL for each supported language. This is dynamically loaded by the app and then used to provide the required strings (and dialog template, etc.)

The downside of the resource DLL is that you have to ship more than one module. But it is easier as you just build the assorted small DLLs, rather than editing the main app multiple times.

Andy

PS The resource DLL approach is one recommended my the MFC team:

How To Create Localized Resource DLLs for MFC Application
http://support.microsoft.com/kb/198846

(this article talks about MFC, but the same kind of thing can be done with wxWidgets or raw Win32, too.)

PPS You have also seen what wxWidgets has to say on the matter?

Internationalization
http://www.wxwidgets.org/about/i18n.php
Last edited on
Topic archived. No new replies allowed.