From 652dfd43d603c33bc0be3bc0c849708d7e064a59 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 12 Aug 2018 01:20:20 +0200 Subject: Windows Installer: implement language selection mechanism at the start of the installer to make easier for international users. --- src/Setup/Wizard.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Setup/Wizard.c') 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 #include @@ -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; -- cgit v1.2.3