1

I'm using Inno Setup as an installer for my program, but I want to be able to choose the default language for the installer itself. I know it chooses default based on system locale (based on a list of languages I've chosen to support), but I would want to select the language according to my rules.

The rules is that for "Norwegian" and "English" OS, I want to show Norwegian, while all other gets defaulted to their own.

After loads of Googling I have not found an answer to this, and it's very possible it just can't be done. But I am also aware that Inno Setup's documentation is rather lacking, so I'm hoping maybe someone knows something which is not written down.

Cœur
  • 34,719
  • 24
  • 185
  • 251
Excludos
  • 1,020
  • 1
  • 10
  • 23

2 Answers2

2

Basically you can use the code from below question, except that instead of presenting a custom language selection dialog, you do your "decision logic".
Inno Setup - Language selector with VCL Styles


Though for your trivial case, why don't you just create an "English" .isl (LanguageID directive set to $0409) with Norwegian contents?

Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846
0
[Setup]
LanguageDetectionMethod=none

Setup will use the first language specified in the [Languages] section as the default language.

CAD Developer
  • 1,172
  • 1
  • 20
  • 26
  • That is certainly an option, which I might have to end up going for. However, and this is due to my bad wording, it doesn't let me specify what language I want myself other than "one default for all". What I need (for reasons I find quite dumb and won't go into) is that all "Norwegian" and "English" os languages get's defaulted to Norwegian, while all other gets defaulted to their own. – Excludos Apr 20 '18 at 12:04
  • So the default language will be decided at runtime? – CAD Developer Apr 20 '18 at 12:11
  • Yes, that is exactly what I mean – Excludos Apr 20 '18 at 12:29