mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: When no language selected by user, explicitly use English as default one unless VeraCrypt is in portable mode.
This commit is contained in:
@@ -2421,8 +2421,21 @@ void InitApp (HINSTANCE hInstance, char *lpszCommandLine)
|
||||
SetPreferredLangId (ConfigReadString ("Language", "", langId, sizeof (langId)));
|
||||
|
||||
if (langId[0] == 0)
|
||||
DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_LANGUAGE), NULL,
|
||||
(DLGPROC) LanguageDlgProc, (LPARAM) 1);
|
||||
{
|
||||
if (IsNonInstallMode ())
|
||||
{
|
||||
// only support automatic use of a language file in portable mode
|
||||
// this is achieved by placing a unique language XML file in the same
|
||||
// place as portable VeraCrypt binaries.
|
||||
DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_LANGUAGE), NULL,
|
||||
(DLGPROC) LanguageDlgProc, (LPARAM) 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// when installed, force using English as default language
|
||||
SetPreferredLangId ("en");
|
||||
}
|
||||
}
|
||||
|
||||
LoadLanguageFile ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user