Microsoft & .NETVisual C#Multilingual Applications - Switching Languages

Multilingual Applications – Switching Languages

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

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

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories