Re: Can I do this with InnoSetup
- From: Michael Fritz <spam_athome@xxxxxxxx>
- Date: Mon, 17 Dec 2007 08:41:37 +0100
"Mohammed Nasman" wrote in message <news:476591a9@xxxxxxxxxxxxxxxxxxxxxx>:
what I would like to do, to add all these languages on registry, and one theHi,
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.
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
.
- References:
- Can I do this with InnoSetup
- From: Mohammed Nasman
- Can I do this with InnoSetup
- Prev by Date: Looking for a way to power off & on a small appliance via telephone
- Next by Date: ANN: Bricksoft IM(MSN,YAHOO,AIM,ICQ) Software Development Kit Forum Created!
- Previous by thread: Re: Can I do this with InnoSetup
- Next by thread: Re: Can I do this with InnoSetup
- Index(es):
Relevant Pages
|
Loading