mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 19:38:26 -06:00
Windows Installer: implement language selection mechanism at the start of the installer to make easier for international users.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user