dcsimg
September 18, 2020
Hot Topics:

Multilingual Applications - Switching Languages

  • By Daniel Zuppinger
  • Send Email »
  • More Articles »

Environment: Windows NT 4, Windows 2000

The support for multiple languages within one application has always been a drag, for NT 4.0 and Window 2000 I have fond a simple solution. Unfortunatley this does not work for Windows 95 or 98 :-(

1. Add all the resources (dialogs, strings, menues etc.) in all of the desired languages in your project.

2. Add a menu, or language selection dialog in your project which calls the code shown below.

3. Thats it.



   // 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));

History

Date Posted: June 20, 1999






This article was originally published on June 19, 1999

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date