diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-08-12 01:20:20 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-08-12 18:30:21 +0200 |
commit | 652dfd43d603c33bc0be3bc0c849708d7e064a59 (patch) | |
tree | 4c158528097a43262d7e88388ec3bd9c84a9dee0 /src/Setup/Wizard.c | |
parent | 012f7bfa93c31143be57cb01ac747f7961b2e534 (diff) | |
download | VeraCrypt-652dfd43d603c33bc0be3bc0c849708d7e064a59.tar.gz VeraCrypt-652dfd43d603c33bc0be3bc0c849708d7e064a59.zip |
Windows Installer: implement language selection mechanism at the start of the installer to make easier for international users.
Diffstat (limited to 'src/Setup/Wizard.c')
-rw-r--r-- | src/Setup/Wizard.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c index 0303f2e6..94e3aae5 100644 --- a/src/Setup/Wizard.c +++ b/src/Setup/Wizard.c @@ -24,6 +24,7 @@ #include "Common/Resource.h" #include "Resource.h" #include "Setup.h" +#include "Registry.h" #include <tchar.h> #include <Strsafe.h> @@ -60,6 +61,8 @@ BOOL bInProgress = FALSE; BOOL bPromptTutorial = FALSE; BOOL bPromptReleaseNotes = FALSE; +extern BOOL bUserSetLanguage; + int nPbar = 0; /* Control ID of progress bar */ static HFONT hDonTextFont; @@ -1069,6 +1072,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa /* Installation completed successfully */ + /* if user selected a language, use for GUI in the next run */ + if (bUserSetLanguage) + { + WCHAR langId[6]; + MultiByteToWideChar (CP_ACP, 0, GetPreferredLangId(), -1, langId, ARRAYSIZE (langId)); + WriteRegistryString (L"Software\\VeraCrypt", L"SetupUILanguage", langId); + } + bInProgress = FALSE; nCurPageNo = DONATIONS_PAGE; |