Locale is set using wxExtend's wxInitializeLocale() helper function now
This commit is contained in:
parent
19a9d9c26d
commit
186bc61723
@ -436,7 +436,6 @@ ARPHELPTELEPHONE +386 1 470 6170
|
|||||||
ARPURLINFOABOUT http://zrcola.zrc-sazu.si/en/contact/
|
ARPURLINFOABOUT http://zrcola.zrc-sazu.si/en/contact/
|
||||||
ARPHELPLINK http://zrcola.zrc-sazu.si/en/info/instructions/
|
ARPHELPLINK http://zrcola.zrc-sazu.si/en/info/instructions/
|
||||||
ARPURLUPDATEINFO http://zrcola.zrc-sazu.si/en/install/
|
ARPURLUPDATEINFO http://zrcola.zrc-sazu.si/en/install/
|
||||||
LANGUAGE #60
|
|
||||||
<<NOKEEP
|
<<NOKEEP
|
||||||
|
|
||||||
!IF "$(LANG)" == "en_US"
|
!IF "$(LANG)" == "en_US"
|
||||||
@ -460,7 +459,7 @@ Registry Root Key Name Value Component_
|
|||||||
s$(MSIBUILD_LENGTH_ID) i2 l255 L255 L0 s$(MSIBUILD_LENGTH_ID)
|
s$(MSIBUILD_LENGTH_ID) i2 l255 L255 L0 s$(MSIBUILD_LENGTH_ID)
|
||||||
Registry Registry
|
Registry Registry
|
||||||
regLocalizationRepositoryPath 2 SOFTWARE\Amebis\ZRCola LocalizationRepositoryPath [ZRCOLALOCDIR] compLocalizationRepositoryPath
|
regLocalizationRepositoryPath 2 SOFTWARE\Amebis\ZRCola LocalizationRepositoryPath [ZRCOLALOCDIR] compLocalizationRepositoryPath
|
||||||
regLanguage 2 SOFTWARE\Amebis\ZRCola Language [LANGUAGE] compLanguage
|
regLanguage 2 SOFTWARE\Amebis\ZRCola Language $(LANG) compLanguage
|
||||||
regDatabasePath 2 SOFTWARE\Amebis\ZRCola DatabasePath [ZRCOLADATADIR] compDatabasePath
|
regDatabasePath 2 SOFTWARE\Amebis\ZRCola DatabasePath [ZRCOLADATADIR] compDatabasePath
|
||||||
reg00_ZRCola 2 SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes 00 ZRCola ZRCola comp00_ZRCola
|
reg00_ZRCola 2 SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes 00 ZRCola ZRCola comp00_ZRCola
|
||||||
<<NOKEEP
|
<<NOKEEP
|
||||||
|
2
Updater
2
Updater
@ -1 +1 @@
|
|||||||
Subproject commit 4baae59fd56dda261add9408039b16c75e3136d6
|
Subproject commit 3cab0a45a928b5951a1bfabbf399a83ab87633a2
|
@ -50,19 +50,15 @@ bool ZRColaApp::OnInit()
|
|||||||
::MsiUseFeature(_T(ZRCOLA_VERSION_GUID), _T("featZRCola"));
|
::MsiUseFeature(_T(ZRCOLA_VERSION_GUID), _T("featZRCola"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Initialize configuration.
|
||||||
wxConfigBase *cfgPrev = wxConfigBase::Set(new wxConfig(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR)));
|
wxConfigBase *cfgPrev = wxConfigBase::Set(new wxConfig(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR)));
|
||||||
if (cfgPrev) wxDELETE(cfgPrev);
|
if (cfgPrev) wxDELETE(cfgPrev);
|
||||||
|
|
||||||
if (!wxApp::OnInit())
|
if (!wxApp::OnInit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Set desired locale.
|
// Initialize locale.
|
||||||
wxLanguage language = (wxLanguage)wxConfigBase::Get()->Read(wxT("Language"), wxLANGUAGE_DEFAULT);
|
if (wxInitializeLocale(m_locale)) {
|
||||||
if (wxLocale::IsAvailable(language)) {
|
|
||||||
wxString sPath;
|
|
||||||
if (wxConfigBase::Get()->Read(wxT("LocalizationRepositoryPath"), &sPath))
|
|
||||||
m_locale.AddCatalogLookupPathPrefix(sPath);
|
|
||||||
wxVERIFY(m_locale.Init(language));
|
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion)));
|
wxVERIFY(m_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion)));
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("Updater") wxT(wxUpdaterVersion)));
|
wxVERIFY(m_locale.AddCatalog(wxT("Updater") wxT(wxUpdaterVersion)));
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("libZRColaUI")));
|
wxVERIFY(m_locale.AddCatalog(wxT("libZRColaUI")));
|
||||||
|
@ -30,25 +30,21 @@ int _tmain(int argc, _TCHAR *argv[])
|
|||||||
{
|
{
|
||||||
wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "program");
|
wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "program");
|
||||||
|
|
||||||
// Inizialize wxWidgets.
|
// Initialize wxWidgets.
|
||||||
wxInitializer initializer;
|
wxInitializer initializer;
|
||||||
if (!initializer) {
|
if (!initializer) {
|
||||||
_ftprintf(stderr, wxT("Failed to initialize the wxWidgets library, aborting.\n"));
|
_ftprintf(stderr, wxT("Failed to initialize the wxWidgets library, aborting.\n"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxConfig config(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR));
|
// Initialize configuration.
|
||||||
|
wxConfigBase *cfgPrev = wxConfigBase::Set(new wxConfig(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR)));
|
||||||
|
if (cfgPrev) wxDELETE(cfgPrev);
|
||||||
|
|
||||||
// Set desired locale.
|
// Initialize locale.
|
||||||
wxLocale locale;
|
wxLocale locale;
|
||||||
wxLanguage language = (wxLanguage)config.Read(wxT("Language"), wxLANGUAGE_DEFAULT);
|
if (wxInitializeLocale(locale))
|
||||||
if (wxLocale::IsAvailable(language)) {
|
|
||||||
wxString sPath;
|
|
||||||
if (config.Read(wxT("LocalizationRepositoryPath"), &sPath))
|
|
||||||
locale.AddCatalogLookupPathPrefix(sPath);
|
|
||||||
wxVERIFY(locale.Init(language));
|
|
||||||
wxVERIFY(locale.AddCatalog(wxT("ZRColaCompile")));
|
wxVERIFY(locale.AddCatalog(wxT("ZRColaCompile")));
|
||||||
}
|
|
||||||
|
|
||||||
// Parse command line.
|
// Parse command line.
|
||||||
static const wxCmdLineEntryDesc cmdLineDesc[] =
|
static const wxCmdLineEntryDesc cmdLineDesc[] =
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e50cae1261b0eea7b3af8aa507b43e547d544af4
|
Subproject commit 385528cf23b9a27d31502865e13652a253d7e228
|
Loading…
x
Reference in New Issue
Block a user