VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-09 01:16:27 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-10 01:44:09 +0200
commitc55e08b31e8100a593b4f81784489a820de807a1 (patch)
tree0fa78904e6ce22cf6fa94f74bd7357a31c371522 /src/Common/Dlgcode.c
parent09db742c3e7e2d10bbef4619aff395d154386ee0 (diff)
downloadVeraCrypt-c55e08b31e8100a593b4f81784489a820de807a1.tar.gz
VeraCrypt-c55e08b31e8100a593b4f81784489a820de807a1.zip
Windows: When no language selected by user, explicitly use English as default one unless VeraCrypt is in portable mode.
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index dc727ee9..e858c3b4 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -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 ();