Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Localization Collapse All
Subject Author Date
Rado Manzela Apr 15, 2014 - 1:40 PM

I want to localize my application, but I have no idea how, do you have some tutorial on this? I’ve checked your LanguageSwitcher sample application, but there is lot of code calling undocumented functions like RscInst_RemoveAll() and it does not even work. When I switch the language, menus are changed, but main dialog is always in English.
Would it be simpler if I don’t need language switch on the fly? How can I set the language when application starts? Thank you.

Rado Manzela May 10, 2014 - 8:52 AM

I was not calling CExtMenuControlBar::LoadMenuBar(). It seems it is not necessary when application is not localized, but now it helped.

Art Wilkes May 8, 2014 - 2:32 PM

This is generally in the rc file. Make sure they are separated by language defines.
Prof-UIS support

Art Wilkes May 5, 2014 - 9:35 AM

Here is what I use for hot switching

VERIFY( g_CmdManager->ProfileSetup(m_ProfUISControlsProfileName ) );


CWinApp * pApp = ::AfxGetApp();

g_ResourceManager->AllowCustomLang();
// these are for reference
int nEnglishvalue = (INT)__EXT_MFC_LANG_ID_ENGLISH_US; // 1033
int nGermanvalue = (INT)__EXT_MFC_LANG_ID_GERMAN; // 1031
int nFrenchvalue = (INT)__EXT_MFC_LANG_ID_FRENCH; // 1036
int nDutchvalue = (INT)__EXT_MFC_LANG_ID_DUTCH_NETHERLANDS; // 1043

m_nCurrentLangDefine = GetProfileInt( _T("LocalizationSettings"), _T("LanguageID"), (INT)__EXT_MFC_LANG_ID_ENGLISH_US );
// these are left for testing
//WORD nDesiredLangID =(WORD) GetProfileInt( _T("LocalizationSettings"), _T("LanguageID"), (INT)__EXT_MFC_LANG_ID_ENGLISH_US );
//WORD nDesiredLangID =(WORD) GetProfileInt( _T("LocalizationSettings"), _T("LanguageID"), (INT)__EXT_MFC_LANG_ID_GERMAN );
//WORD nDesiredLangID =(WORD) GetProfileInt( _T("LocalizationSettings"), _T("LanguageID"), (INT)__EXT_MFC_LANG_ID_FRENCH );
//WORD nDesiredLangID =(WORD) GetProfileInt( _T("LocalizationSettings"), _T("LanguageID"), (INT)__EXT_MFC_LANG_ID_DUTCH_NETHERLANDS );

g_ResourceManager->SetLangIdDesired( m_nCurrentLangDefine );

Prof-UIS Support

Rado Manzela May 8, 2014 - 2:15 PM

Thank you, I’ve using the same technique, now everything works except one important problem in SDI application - main frame menu (IDR_MAINFRAME) still shows English texts in top level, only submenus are localized. Do you have idea what could be wrong? I call SetLangIdDesired() in the application InitInstance() before main frame is created.