// switch language to german
::SetThreadLocal(MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_DEFAULT),SORT_DEFAULT));
...
// or back to english
::SetThreadLocal(MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT),SORT_DEFAULT));

Easy way for switching languages with DLLs

In my last project I was responsible for GUI development and NLS. I've found another way. The only disadvantage is, that you have to buy another software: a so called "localization tool".
What I did is to extract all resources into a DLL which can be loaded at runtime (on-the-fly). So it's possible to load any language specific resource DLL at any time to change the language. No modifications to other code than just unloading the current and loading the new DLL.
Advantages:
- you only have to make a resource change once, e.g. if you change a dialog, you don't have to do this change in all other languages. Just generate the new DLLs
- it's easy to give a text file or excel sheet to a translator and to use these files as a glossary to generate destination DLLs.
- often there exist the possibility in these tools to autotranslate

For those who don't want to buy another software: it's also possible to modify the DLLs with Visual Studio but then it's almost the same as in this article.

Multilingual application.

Posted by purish87
on 04/08/2009 02:18am

Your solution is quite interesting. Can u provide any sample application for help?
Is there any way to change the text of Afxmessagebox() using this?

Top White Papers and Webcasts

Live Event Date: April 21, 2015 @ 1:00 p.m. ET / 10:00 a.m. PT
For mid-sized companies, the challenge of serving people and providing better service is forcing a re-evaluation of their contact centers to improve customer experiences. While these growing enterprises are driving much of the market's innovation, they must remain nimble in how they operate, and be very responsive to customer needs. This upcoming eSeminar reveals five ways mid-size organizations can gain needed agility and examines how delivering …

Migrating away from Windows Server 2003 is an investment in your organization's future, and there has never been a better time to begin the migration process. Take the next step to transform your datacenter by upgrading your server platform with leading edge Windows Operating Systems and SanDisk flash solutions.