Introduction
Developing applications supporting multiple languages has always been a drag. With the
possibility of including several languages into the rc file of a project, the problem is
not entirely solved: The operating system is used as a base and decides what language your
application is working with.
If as example, the resources contain English and German, the application will use the
English resources on an American or British Windows system, and German on a German or
Swiss (German) Windows version. Other language versions of Windows will use the default
language (English in most cases).
This behavior is acceptable in most cases, but can cause some headaches: A French
speaking person might prefer the German version of your application, but gets by default
the English version. Under Windows NT and Windows 2000, there is a simple way of adding the
functionality for switching between languages.
Please note: This will only work under NT 3.51 and Windows 2000. There were some
problems using NT 4.0 SP3 (and earlier?) reported, but I could not confirm them.
Step 1.
Add the desired languages to your resources.

Step 2.
Enhance your code as follows:
m_lang = GetProfileInt("General","Language",0);
if (m_lang == 0) {
::SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH,
SUBLANG_DEFAULT),SORT_DEFAULT));
}
else {
::SetThreadLocale(MAKELCID(MAKELANGID(LANG_GERMAN,
SUBLANG_DEFAULT),SORT_DEFAULT));
}
void CLanguageApp::OnLanguageTogglelanguage()
{
if (m_lang == 0) {
WriteProfileInt("General","Language",1);
}
else {
WriteProfileInt("General","Language",0);
}
AfxMessageBox(IDS_RESTART);
}