/usr/share/nsis/Contrib/Modern UI 2/Localization.nsh is in nsis-common 2.50-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | /*
NSIS Modern User Interface
Localization
*/
;--------------------------------
;Variables
!macro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
!ifndef MUI_LANGDLL_REGISTRY_VARAIBLES
!define MUI_LANGDLL_REGISTRY_VARAIBLES
;/GLOBAL because the macros are included in a function
Var /GLOBAL mui.LangDLL.RegistryLanguage
!endif
!endif
!macroend
;--------------------------------
;Include langauge files
!macro MUI_LANGUAGE LANGUAGE
;Include a language
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_INSERT
LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
;Include language file
!insertmacro LANGFILE_INCLUDE_WITHDEFAULT "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh"
;Add language to list of languages for selection dialog
!ifndef MUI_LANGDLL_LANGUAGES
!define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
!else
!ifdef MUI_LANGDLL_LANGUAGES_TEMP
!undef MUI_LANGDLL_LANGUAGES_TEMP
!endif
!define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
!undef MUI_LANGDLL_LANGUAGES
!ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
!undef MUI_LANGDLL_LANGUAGES_CP_TEMP
!endif
!define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MUI_LANGDLL_LANGUAGES_CP}"
!undef MUI_LANGDLL_LANGUAGES_CP
!define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_CP_TEMP}"
!endif
!verbose pop
!macroend
;--------------------------------
;Language selection
!macro MUI_LANGDLL_DISPLAY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_LANGDLL_VARIABLES
!insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
!insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage != ""
;Set default langauge to registry language
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${unless} ${Silent}
!endif
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
${if} $mui.LangDLL.RegistryLanguage == ""
!endif
!endif
;Show langauge selection dialog
!ifdef MUI_LANGDLL_ALLLANGUAGES
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
!else
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES_CP} ""
!endif
Pop $LANGUAGE
${if} $LANGUAGE == "cancel"
Abort
${endif}
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
${endif}
!endif
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${endif}
!endif
!verbose pop
!macroend
!macro MUI_LANGDLL_SAVELANGUAGE
;Save language in registry
!ifndef MUI_PAGE_UNINSTALLER
IfAbort mui.langdllsavelanguage_abort
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
!endif
mui.langdllsavelanguage_abort:
!endif
!macroend
!macro MUI_UNGETLANGUAGE
;Get language from registry in uninstaller
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage = ""
!endif
!insertmacro MUI_LANGDLL_DISPLAY
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
${else}
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!verbose pop
!macroend
;--------------------------------
;Rerserve LangDLL file
!macro MUI_RESERVEFILE_LANGDLL
!verbose push
!verbose ${MUI_VERBOSE}
ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
!verbose pop
!macroend
|