A recent change, committed Feb 11, 2016: 'Moved language initialization code', has introduced an interesting problem: in 'Options...', selecting a language (that is not the OS installed language, or English) has no effect.
This is because variable m_Language is undefined (as value is not set from Settings) before the SetLanguageModule() call, resulting in the OS installed language (or the English in Explorer++.exe) to be used.
E.g. Explorer++ built from recent github source, run in English region (US, UK, AU, etc.), select French - does not get loaded even when FR dll exists - 'Explorer++.exe -l FR' works fine.
selecting a language (not the OS language) has no effect
-
- Site Admin
- Posts: 933
- Joined: Sat Apr 18, 2009 1:46 am
Re: selecting a language (not the OS language) has no effect
That doesn't entirely surprise me It's somewhat difficult to sort out which order parts of the initialization code need to run in. Hopefully the fix shouldn't be too hard, I think the language initialization call can just be done directly after LoadAllSettings().
Re: selecting a language (not the OS language) has no effect
Moving the SetLanguageModule and GetDefaultColorRules calls to Initialization.cpp has fixed this problem for me.
Re: selecting a language (not the OS language) has no effect
I found that this did not load my saved <ColorRules> (in config.xml), and these were lost on Settings save when program exits.dilosec wrote:Moving the SetLanguageModule and GetDefaultColorRules calls to Initialization.cpp has fixed this problem for me.
I've moved the code back to Explorer++.cpp, and added code pinched from elsewhere to load Settings before SetLanguageModule call.
The solution is not the best, but it works for me - correct loads saved Language translation dll and ColorRules.
Code: Select all
ILoadSave *pLoadSave = NULL;
TestConfigFile();
if(m_bLoadSettingsFromXML)
{
pLoadSave = new CLoadSaveXML(this,TRUE);
m_bSavePreferencesToXMLFile = TRUE;
}
else
{
pLoadSave = new CLoadSaveRegistry(this);
}
pLoadSave->LoadGenericSettings();
delete pLoadSave;
SetLanguageModule();
m_ColorRules = NColorRuleHelper::GetDefaultColorRules(m_hLanguageModule);