Skip Navigation LinksBCGSoft > Support > Developer Area > Localization

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:

DLL name Language
BCGCBProResCAT.dllCatalan
BCGCBProResCHS.dllChinese
BCGCBProResCSY.dllCzech
BCGCBProResDEN.dllDanish
BCGCBProResDEU.dllGerman
BCGCBProResDUT.dllDutch
BCGCBProResELL.dllGreek
BCGCBProResESP.dllSpanish
BCGCBProResFRA.dllFrench
BCGCBProResHEB.dllHebrew
BCGCBProResHUN.dllHungarian
DLL name Language
BCGCBProResITA.dllItalian
BCGCBProResJPN.dllJapanese
BCGCBProResKOR.dllKorean
BCGCBProResPLK.dllPolish
BCGCBProResPTB.dllPortuguese (Brazil)
BCGCBProResPTG.dllPortuguese
BCGCBProResROM.dllRomanian
BCGCBProResRUS.dllRussian
BCGCBProResSKY.dllSlovak
BCGCBProResSLV.dllSlovenian
BCGCBProResTRK.dllTurkish

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
    BCGCBProSetResourceHandle(
        m_hinstBCGCBProRes);
  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"
to
#include "L.***\BCGControlBar.rc" 
    // *** language
#pragma code_page(code)
e.g.
#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:
    • BCGCBRes.dsp
    • BCGCBRes.dsw
  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