如何本地化组件和类型名称?例如:
[Languages]
Name: "eng"; MessagesFile: "Idiomas\English.isl"
Name: "spa"; MessagesFile: "Idiomas\Spanish.isl"
如果我选择英语:
[Types]
Name: "full"; Description: "Full installation"
Name: "compact"; Description: "Compact installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom
[Components]
Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed
Name: "readme"; Description: "Readme File"; Types: full
或者如果我选择西班牙语:
[Types]
Name: "full"; Description: "Instalación Completa"
Name: "compact"; Description: "Instalación Mínima"
Name: "custom"; Description: "Instalación Personalizada"; Flags: iscustom
[Components]
Name: "program"; Description: "Archivos de Programa"; Types: full compact custom; Flags: fixed
Name: "readme"; Description: "Archivo de Ayuda"; Types: full
答案 0 :(得分:3)
在语言文件中定义custom messages:
idiomas\English.isl
:
[CustomMessages]
FullInstallation=Full installation
CompactInstallation=Compact installation
CustomInstallation=Custom installation
ProgramFilesComponent=Program Files
ReadmeFileComponent=Readme File
idiomas\Spanish.isl
:
[CustomMessages]
FullInstallation=Instalación Completa
CompactInstallation=Instalación Mínima
CustomInstallation=Instalación Personalizada
ProgramFilesComponent=Archivos de Programa
ReadmeFileComponent=Archivo de Ayuda
或您可以使用主.iss文件中的[CustomMessages]
部分:
[CustomMessages]
eng.FullInstallation=Full installation
spa.FullInstallation=Instalación Completa
...
然后使用脚本中的{cm:MessageName}
constant使用这些自定义消息:
[Types]
Name: "full"; Description: "{cm:FullInstallation}"
Name: "compact"; Description: "{cm:CompactInstallation}"
Name: "custom"; Description: "{cm:CustomInstallation}"; Flags: iscustom
[Components]
Name: "program"; Description: "{cm:ProgramFilesComponent}"; Types: full compact custom; Flags: fixed
Name: "readme"; Description: "{cm:ReadmeFileComponent}"; Types: full