Click here to Skip to main content
Click here to Skip to main content

Multilingual Application - Change Application Language

, 17 Nov 1999
Rate this:
Please Sign up or sign in to vote.
Multilingual Application - Change Application Language


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:

 // Place this code in InitInstance()
 m_lang = GetProfileInt("General","Language",0);
  if (m_lang == 0) {
    // switch language to english
  else {
    // switch language to german
  // Add a menu or a toolbar button and attach this method 

  void CLanguageApp::OnLanguageTogglelanguage() 
    if (m_lang == 0) {
    else {
    AfxMessageBox(IDS_RESTART); // tell the user to restart the application



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Daniel Zuppinger
Chief Technology Officer
Switzerland Switzerland
Professional IT developer since 1983. First projects with Cobol, then Pascal, Modula2, C and since Visual C++ 1.0 also with C++. Works since 1986 as Consultant, between 1990 and 2008 for Infobrain in Switzerland, currently employed by enValue (also Switzerland).
Current field is the project management and development of software for Bank applications.
Married, two daughters, Hobbies : Paragliding, Orienteering, Mountainbiking, Photography

Comments and Discussions

QuestionI can't use in Russian Pinmembercoma3232-Dec-07 1:28 
GeneralPlease help Pinmembersreejith ss nair18-Sep-05 22:28 
QuestionHow about using French Pinmemberashish kumar patel1-Aug-05 20:19 
AnswerRe: How about using French PinmemberOphir15-Feb-06 11:46 
GeneralProblem with language=English(USA) Pinmemberachimschoen24-Apr-05 21:53 
GeneralGlobalization using .NET and Oracle 10g Pinmemberashit_barot21-Mar-05 19:58 
GeneralMircrosoft advise against this on 2000/XP PinmemberObliterator15-Dec-04 4:42 
GeneralUse external language packs instead of DLLs for supporting multilingual PinmemberHerman Kwan9-Aug-02 15:14 
Just like Netants, FlashGet, Tweak-XP, PatchWise Free, etc. More and more applications use external language packs (*.ini or *.lng) instead of DLLs for supporting multilingual. It’s not necessary to recompile the whole project because the language packs can be added or modified dynamically. Absolutely, it's easy to translate and maintain the external language packs which are just like an INI-like text file. Smile | :)
Here's a software development libraries named "LocWise" can easy help you provide multilingual support for Win32 software using external language packs.
Check TUCOWS for details.
Or, visit its home page in - Multiligual Development & Patch Utilities
QuestionHow about the Win95/98/ME Pinmembersandy16-Oct-01 5:56 
AnswerRe: How about the Win95/98/ME Pinmemberrudie7-Jan-03 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150327.1 | Last Updated 18 Nov 1999
Article Copyright 1999 by Daniel Zuppinger
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid