1

如果根据操作系统的语言安装不同的文件(例如英文 Windows、简体中文 Windows、繁体中文 Windows 等)?这可能吗?

例如:我想做以下事情:

[code]
function InitializeSetup(): Boolean;  

if " OS Language is English" then begin
   MsgBox('This is English Version ?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDNO  
else if " OS Language is Traditional Chinese" 
   MsgBox('This is Traditional Chinese ?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDNO 
end;
4

1 回答 1

0

You can use the GetUILanguage support function to detect the OS language.

So you can code like this:

const
  LangEnglish = $09;
  LangSpanish = $0A;
  LangFrench = $0C;

if GetUILanguage and $3FF = LangEnglish then
  MsgBox('This is English Version!', mbInformation, MB_YES)
else if GetUILanguage and $3FF = LangSpanish then
  MsgBox('Esta es la versión en español!', mbInformation, MB_YES)
else if GetUILanguage = $0C01 then
  MsgBox('This is Arabic-Egypt Version!', mbInformation, MB_YES)

Documentation of: language constants

于 2012-11-22T08:09:08.647 回答