1
0
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:
Mounir IDRASSI
2018-08-12 01:20:20 +02:00
parent 012f7bfa93
commit 652dfd43d6
47 changed files with 469 additions and 6 deletions

View File

@@ -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;