Re: How does online language switching work?
- From: "Mihai N." <nmihai_year_2000@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 19:57:45 -0700
I heard of an internationalization utility called "Rapid Translation"....
MFC functionality that makes this possible? I'm asking because I
need a similar functionality for my program.
There is no need for any tricks.
If you have a MFC application called BLA.exe, just drop in the same folder
a resource only DLL with the name BLA.<3charLangCode>
Then the application will automatically match the OS language, if
localization is available (ie: show German if the OS UI is German and BLA.DEU
is there).
And you can also force the language to some user preference you can
load the resource file (LoadLibrary) and call call AfxSetResourceHandle.
The usual functionality is that you have to restart the application,
because the UI will have to be destroyed and recreated
Doing it on the fly is spectacular, but it does work only for small toy
applications. For a complex one it is more work than is worth.
Imagine that you have to remember the documents, reopen them,
if you have undo history you have to translate it (think "Undo Paste"),
you have to reload bitmaps, icons, accelerators, all.
Also, a mechanism that translates only string is not flexible enough.
There is more than strings that change during localization: dialogs
get resized, fonts change, accelerators, bitmaps, icons, colors, etc.
The resource only DLL + application restart is the current recomended
method ("best current practice")
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
.
- Prev by Date: Re: CString & COleCurrency .Format question
- Next by Date: Re: backward compatibility in Vista
- Previous by thread: Re: CString & COleCurrency .Format question
- Next by thread: Re: Need help resolving modeless dialog issue
- Index(es):
Relevant Pages
|