For me, I have initialization the language here:
Code: Select all
bool MainApp::OnInit()
{
int sysLang = wxLocale::GetSystemLanguage();
m_locale.Init(sysLang, wxLOCALE_LOAD_DEFAULT);
wxLocale::AddCatalogLookupPathPrefix("yyyyy");
if(!m_locale.AddCatalog("xxx.mo", xxxxx))
{
wxMessageBox("Can not load locals files");
}
...
Code: Select all
wxString SomeClass::m_Text = _("hello world");
So, my question is: What is the best place to initialize the language translation?
One possible way is to set this static member variable after MainApp::OnInit() function call, that it means I have to set this static member string twice. Any ideas? Thanks.