当我以德语运行instaler时,安装程序UI以德语显示,但应用程序UI没有使用NSIS以德语显示
当我在德语区域运行安装程序时,安装程序UI显示为德语,但应用程序UI没有显示为德语。相反,它是用英语显示的 为了使安装程序UI按照区域设置工作,我创建了单独的.nsh文件(!包括“CustomEnglish.nsh”!包括“CustomGerman.nsh”!包括“CustomItalian.nsh”),并将这些文件包括在我的.nsi文件中。因此,它正在按预期工作 为了使应用程序UI按照语言环境工作,我使用下面基于语言的检查,并将文件(为每种语言创建单独的Resource DLL)放置在安装目录中 根据安装目录中的区域设置放置DLL或文件是否正确? 而且我也没有使用该声明!在此.nsi文件中插入宏MUI_语言“英语”。因为这句话我是在说!包括“CustomEnglish.nsh”(我还附上CustomEnglish.nsh以供参考) 请帮助我为什么应用程序UI没有显示为德语 下面是完整的代码:当我以德语运行instaler时,安装程序UI以德语显示,但应用程序UI没有使用NSIS以德语显示,nsis,Nsis,当我在德语区域运行安装程序时,安装程序UI显示为德语,但应用程序UI没有显示为德语。相反,它是用英语显示的 为了使安装程序UI按照区域设置工作,我创建了单独的.nsh文件(!包括“CustomEnglish.nsh”!包括“CustomGerman.nsh”!包括“CustomItalian.nsh”),并将这些文件包括在我的.nsi文件中。因此,它正在按预期工作 为了使应用程序UI按照语言环境工作,我使用下面基于语言的检查,并将文件(为每种语言创建单独的Resource DLL)放置在安装目录
!include "MUI2.nsh"
!include x64.nsh
!include WinVer.nsh
Name "Millinnium 4.0"
RequestExecutionLevel admin
;RequestExecutionLevel user
; Below is the include file to check the conditions (If and else)
!include LogicLib.nsh
;Customizing the Welcome Text
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_INSTFILES
${EndIf}
SectionEnd
;--------------------------------
Section "Uninstall"
SectionEnd
CustomEnglish.nsh
!insertmacro MUI_LANGUAGE "English"
!define ApplicationName "Millinnium"
LangString welcometitle ${LANG_ENGLISH} "Welcome to the ${ApplicationName} Setup Wizard"
LangString welcometext ${LANG_ENGLISH} "The Setup Wizard will install ${ApplicationName} on$\r$\nyour computer. Click Next to continue or Cancel to exit the$\r$\nSetup Wizard."
LangString licensetitle ${LANG_ENGLISH} "End-User License Agreement"
LangString licensesubtitle ${LANG_ENGLISH} "Please read the following license agreement carefully"
LangString licensecheckboxtext ${LANG_ENGLISH} "I &agree to terms in the License Agreement"
LangString mydirtoptext ${LANG_ENGLISH} "Install ${ApplicationName} to:"
LangString mydirtitle ${LANG_ENGLISH} "Destination Folder"
LangString mydirsubtitle ${LANG_ENGLISH} "Click Next to install to the default folder or click Browse to choose another"
我找到了不以其他语言(例如法语)显示UI的根本原因。这是因为我没有在“INSTDIR”中包含特定于语言的文件夹(例如,包含resources.dll的“fr”) 包括我已经编写了以下代码行,现在正在运行:
SetOutPath $INSTDIR\fr
File /a /r "C:\Code\EMR\bin\x86\Release\fr\"
这是一个NSIS问题还是关于您正在安装的应用程序的问题?这是一个NSIS问题。使用NSIS脚本应用程序不会基于区域设置显示。看起来您正在询问从何处提取一些应用程序文件,这将使它成为有关此特定应用程序的问题,并且与NSIS无关。是的,使用语句(${If}$Language==1033(对于英语))检查区域设置是否正确?。请帮助我如何根据NSIS中的区域设置提取文件?是的,这就是检查安装程序区域设置的方式。