From 384dbc3114feec02101d53a5e2c74aa573e982de Mon Sep 17 00:00:00 2001 From: mpheath Date: Wed, 13 Oct 2021 10:29:10 +1000 Subject: [PATCH] add set language for Sandman for the Plus installer --- Installer/Sandboxie-Plus.iss | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Installer/Sandboxie-Plus.iss b/Installer/Sandboxie-Plus.iss index 03c1d85e..f24f4b44 100644 --- a/Installer/Sandboxie-Plus.iss +++ b/Installer/Sandboxie-Plus.iss @@ -62,6 +62,12 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Name: "{userdesktop}\Sandboxie-Plus"; Filename: "{app}\SandMan.exe"; Tasks: DesktopIcon; MinVersion: 0.0,5.0 +[INI] +; Set Sandman language. +Filename: "{localappdata}\{#MyAppName}\{#MyAppName}.ini"; Section: "Options"; Key: "UiLanguage"; String: "{code:SandmanLanguage|{language}}"; Check: not IsPortable +Filename: "{app}\{#MyAppName}.ini"; Section: "Options"; Key: "UiLanguage"; String: "{code:SandmanLanguage|{language}}"; Check: IsPortable + + [Registry] ; Autostart Sandman. Root: HKCU; Subkey: "Software\Software\Microsoft\Windows\CurrentVersion\Run"; ValueName: "SandboxiePlus_AutoRun"; ValueType: string; ValueData: """{app}\SandMan.exe"" -autorun"; Flags: uninsdeletevalue; Tasks: AutoStartEntry @@ -170,6 +176,26 @@ begin end; +function SandmanLanguage(Language: String): String; +begin + + // Language values for Sandboxie-Plus.ini. + case Lowercase(Language) of + 'english': Result := 'en'; + 'chinesesimplified': Result := 'zh-CN'; + 'chinesetraditional': Result := 'zh-TW'; + 'dutch': Result := 'nl'; + 'german': Result := 'de'; + 'italian': Result := 'it'; + 'polish': Result := 'pl'; + 'portuguese': Result := 'pt'; + 'russian': Result := 'ru'; + 'spanish': Result := 'es'; + 'turkish': Result := 'tr'; + end; +end; + + procedure UpdateStatus(OutputProgressPage: TOutputProgressWizardPage; Text: String; Percentage: Integer); begin