Re: How does online language switching work?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
.



Relevant Pages

  • Re: why use the sealed ?
    ... > I'll want to add functionality to something at a later date. ... > I sortof wish you could add functionality to (or replace members of) ... > exceeds past the end of the string. ... > application to be a Remoting Client. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Predicting the Future and Kolmogorov Complexity
    ... to the source string), k scales with the string, thus destroying the ... excess of symmetry or a lack of it that strikes you as particularly ... The same thing is true of radio signals. ... What do I mean by levels of functionality? ...
    (talk.origins)
  • Re: basic_string causes crash in _vsnprintf???
    ... and any other output string sets used. ... want or revert back to the old stl. ... >> this functionality so while it was not a standard STL implementation ... > In STLport it's just luck that it "works". ...
    (microsoft.public.vc.stl)
  • Re: Get/Set vs Public Variables
    ... string firstname; ... EVER will need any functionality in getters and setters for the two string ... databinding that it can bind only to properties and not to variables. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Alphabetizing a Comma Delimited String
    ... > client to put it back into a comma-delimited string. ... One *wonders* why this functionality is not in the server engine. ... This function was added in MySQL version 4.1. ... You can remove the separator altogether by specifying SEPARATOR "". ...
    (microsoft.public.sqlserver.programming)