BCGSoft > Developer Area > Localization


The localization mechanism provides a very simple and robust way to create multilingual applications.

BCGControlBar language pack files:

The localization files are located in BCGCBPro\L.* directories, where * - language name prefix (FRA - French, ITA - Italian, ...). Language-specific resource DLLs are located in your BCGControlBar\Bin directory:

BCGCBProResCHS.dll Chinese BCGCBProResITA.dll Italian
BCGCBProResCSY.dll   Czech BCGCBProResJPN.dll Japanese
BCGCBProResDEN.dll Danish BCGCBProResKOR.dll Korean
BCGCBProResDEU.dll   German BCGCBProResPTG.dll Portuguese
BCGCBProResDUT.dll Dutch BCGCBProResROM.dll Romanian
BCGCBProResELL.dll   Greek BCGCBProResRUS.dll Russian
BCGCBProResESP.dll   Spanish BCGCBProResSKY.dll Slovak
BCGCBProResFRA.dll   French BCGCBProResSLV.dll Slovenian
BCGCBProResHUN.dll   Hungarian BCGCBProResTRK.dll Turkish


Localization with BCGControlBar DLL version:

  1. Add the following member to your application class:

        HINSTANCE    m_hinstBCGCBProRes;

  2. In the application's InitiInstance () add the DLL resource initialization:

        m_hinstBCGCBProRes = LoadLibrary (_T("BCGCBProRes***.dll"));    // *** - language

  3. Unload resource DLL in ExitInstance:

        FreeLibrary (m_hinstBCGCBProRes);

Localization with BCGControlBar static library version:

In the project's "Resource Includes" dialog (View | Resource Includes) modify

#include "BCGCBPro.rc"
#include "L.***\BCGControlBar.rc" // *** language
#pragma code_page(code)

#include "L.FRA\BCGControlBar.rc"
#pragma codepage(1252)

How to translate the library resources to the new language?

  1. Under your BCGControlBar directory, create new subdirectory called "L.***" where "***" is the language name prefix.
  2. Copy the following files from the any other existing language directory:


  3. Copy BCGCBPro.rc (English resources) from BCGControlBar directory. Rename it to BCGControlBar.rc
  4. In the Visual C++, open BCGCBRes project
  5. Remove resource version info
  6. Change the DLL output file name to "..\..\bin\BCGCBProRes***.dll" (*** - is the language name prefix)
  7. Translate the dialog, string and menu resources.
  8. Build the project. Because BCGControlBar.rc has references to the common BCGControlBar resources (bitmaps, icons and cursors), you'll be notified about creating a "RES" subdirectory. This is a Visual Studio resource editor problem - it doesn't interpret path obtained from the project settings in the correct way. Just answer yes and L.***\RES will be created. When the resource file is complied (both static and DLL mode), the correct RES path (BCGControlBar dir\RES) will be taken. The language resources DLL will be placed into the BIN directory.

Back to the Developer Area