Re: Can I do this with InnoSetup



"Mohammed Nasman" wrote in message <news:476591a9@xxxxxxxxxxxxxxxxxxxxxx>:

what I would like to do, to add all these languages on registry, and one the
user select a language, the installer add key to the windows registry, so
later my application will be load the language based on the registry key.
Hi,

I did it this way with a single, user selected, installation language:

[Registry]
Root: HKCU; Subkey: Software\<$COMPANY$>\<$PROGNAMESHORT$>; ValueType:
string; ValueName: Language; ValueData: {language}

<$COMPANY$> and <$PROGNAMESHORT$> are just defines from above the script
and you can easily change it to fit your needs.

The installer write a registry key with the language the user selected
during installation process. My application then reads this key like:

class function TPWCGlobalSettings.DetermineLanguage : string;
// Read registry key written by the installer
begin
Result := cLangEN; // Default language is English!
with TRegistry.Create(KEY_READ) do
begin
RootKey := HKEY_CURRENT_USER;
if OpenKeyReadOnly(Format('\Software\%s\%s', [cCompany,
cApplicationTitleBlanks])) then
begin
Result := AnsiUpperCase(ReadString('Language'));
CloseKey;
end;
Free;
end;
end;

Of course you should again change cCompany and cApplicationTitleBlanks to
the appropriate values.

Perhaps it's a stating point.
--
cu,
Michael
.



Relevant Pages

  • Can I do this with InnoSetup
    ... I have an installer with many languages, and my application will use the ... selected language when it started. ... what I would like to do, to add all these languages on registry, and one the ... later my application will be load the language based on the registry key. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: System Monitor: Perflib_Perfdata_*.dat
    ... In the registry tree, right click a registry key. ... The Windows Performance tool is composed of two parts: System Monitor ... the Perflib subkey contains a Language-code ... subkey for each spoken language you configure for Windows 2000. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: how run linux from CD, porblem is very problematic
    ... hindi, bengali etc. ... What is your local language? ... i downloaded the installer debian cd first but it didn't work like the ... and i am using it to download ...
    (comp.os.linux.setup)
  • Re: Localizer v.3.25 - Language trasnlations get lost?!?
    ... Maybe the one installer would be sufficient. ... I would put all language dlls ... 'external' and 'skipifsourcedoesntexist' flags, like this: ... Source: {src}\MyApp.csy; DestDir:; Flags: external ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Localizer v.3.25 - Language trasnlations get lost?!?
    ... Maybe the one installer would be sufficient. ... I would put all language dlls ... 'external' and 'skipifsourcedoesntexist' flags, like this: ... Source: {src}\MyApp.csy; DestDir:; Flags: external ...
    (borland.public.delphi.thirdpartytools.general)

Loading