I have wrote a Progream.The program will be bilingual. I have used wxwidgets. But the language change comes only after I have closed my window and started again.
Is there a feature of wxwidgets that the language changes presented without reloading the window or relaod automatic he windows?
Thank you for your Help
here my code to take the my porgramm bilanguage that works
Code: Select all
void CSettingsExpertFrame::SelectLanguage(int lang)
{
wxLocale* pLocal = NULL;
pLocal = g_pApp->GetLocale();
if( pLocal != 0 )
delete pLocal;
pLocal = new wxLocale( lang );
pLocal->AddCatalogLookupPathPrefix(wxGetCwd());
pLocal->AddCatalog( wxT("maindlg") );
}
void CSettingsExpertFrame::EVT_BTN_LANG_OK( wxCommandEvent& event )
{
SelectLanguage( wxLANGUAGE_DEFAULT );
int i_ChoiceSelect;
wxArrayInt ai_languageCodes;
wxArrayString aS_languageNames;
i_ChoiceSelect=m_choiceLang->GetCurrentSelection();
ai_languageCodes.Add(wxLANGUAGE_GERMAN);
aS_languageNames.Add(_("Deutsch"));
ai_languageCodes.Add(wxLANGUAGE_ENGLISH);
aS_languageNames.Add(_("English"));
if (i_ChoiceSelect==0)
{
SelectLanguage(0);
}
else
{
SelectLanguage(ai_languageCodes[i_ChoiceSelect]);
}
GetParent()->Refresh();
GetParent()->Layout();
Refresh();
Layout();
}