what is siFormStorage

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Sheenajobi
Posts: 5
Joined: Tue May 27, 2003 5:15 am

what is siFormStorage

Post by Sheenajobi »

what is siFormStorage
gaivans
Posts: 71
Joined: Fri Nov 29, 2002 4:10 pm

Post by gaivans »

This is an auxilary component which is used internally in the TsiLang Component Suite to store last forms postion, size and other settings.
Best regards,
Serghei Gaivan
Sheenajobi
Posts: 5
Joined: Tue May 27, 2003 5:15 am

Can I get the default lang of the machine.

Post by Sheenajobi »

Can I get the default lang of the machine.
So I can open the lang according to the local language
gaivans
Posts: 71
Joined: Fri Nov 29, 2002 4:10 pm

Post by gaivans »

You can use standard Win32 API function GetUserDefaultLangID. For example, something like the below code:
var
LangID: DWORD;
begin
LangID := GetUserDefaultLangID;
case Byte(LangID) of
LANG_ENGLISH: siLang.ActiveLanguage := 1;
LANG_GERMAN: siLang.ActiveLanguage := 2;
else
siLang.ActiveLanguage := 1;
end;
For the full list of language identifiers see Windows.pas or Win32.hlp
Best regards,
Serghei Gaivan
Haron
Posts: 39
Joined: Thu Mar 11, 2004 6:29 am

Post by Haron »

Small mistake: not Byte(LangID) but (LangID and $03FF) !
Post Reply