gpt4 book ai didi

inno-setup - Inno Setup - 如何本地化组件和类型名称?

转载 作者:行者123 更新时间:2023-12-01 22:19:38 26 4
gpt4 key购买 nike

如何本地化组件和类型名称?例如:

[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

最佳答案

定义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

English

Spanish

关于inno-setup - Inno Setup - 如何本地化组件和类型名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41147253/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com