26
26
!include " StrContains.nsh"
27
27
!insertmacro VersionCompare
28
28
; --------------------------------
29
+ !define LANGFILE_LANGDLL_FMT" %ENGNAME%" ; or %NATIVEASCIINAME%, %NATIVENAME% can also be used but it will display ? in some cases.
29
30
; General
30
31
Name " ${PRODUCT_NAME} ${PRODUCT_VERSION}"
31
32
OutFile " ${BUILD_DIR}\installers\${PRODUCT_NAME}_${PG_DEF_VERSION}_${PG_INS_SUFFIX}"
@@ -201,6 +202,7 @@ Page custom nsDialogMore nsDialogsMorePageLeave
201
202
!insertmacro MUI_LANGUAGE" English" ; first language is the default language
202
203
!insertmacro MUI_LANGUAGE" Russian"
203
204
205
+
204
206
!include translates.nsi
205
207
206
208
!ifndef myLicenseFile_ru
@@ -2115,6 +2117,16 @@ FunctionEnd
2115
2117
!insertmacro GetUIId "un."
2116
2118
*/
2117
2119
2120
+ !macro GetUIId UN
2121
+ Function ${UN} GetUIId
2122
+ ; System::Call 'kernel32::GetSystemDefaultLCID() i.r10'
2123
+ System::Call ' kernel32::GetACP() i.r10'
2124
+ Push $R0
2125
+ FunctionEnd
2126
+ !macroend
2127
+ !insertmacro GetUIId" "
2128
+ !insertmacro GetUIId" un."
2129
+
2118
2130
Function .onInit
2119
2131
Call CheckWindowsVersion
2120
2132
Call SetDefaultTcpPort
@@ -2130,20 +2142,23 @@ ${EndIf}
2130
2142
2131
2143
2132
2144
; SectionSetFlags ${secClient} ${SF_RO}
2133
- /* Call GetUIId
2145
+ Call GetUIId
2134
2146
pop$R0
2135
- ${if} $R0 == "1049 "
2147
+ ${if} $R0 == " 1251 "
2136
2148
!define MUI_LANGDLL_ALLLANGUAGES
2137
2149
!insertmacro MUI_LANGDLL_DISPLAY; select language
2150
+ ${else}
2151
+ StrCpy $LANGUAGE ${LANG_ENGLISH}
2138
2152
${endif}
2139
- */
2153
+
2154
+ /*
2140
2155
CheckLang::CheckLang "0419"
2141
2156
pop $R0
2142
2157
${if} $R0 == "1"
2143
2158
!define MUI_LANGDLL_ALLLANGUAGES
2144
2159
!insertmacro MUI_LANGDLL_DISPLAY ;select language
2145
2160
${endif}
2146
-
2161
+ */
2147
2162
2148
2163
2149
2164
StrCpy $PG_OLD_DIR " "
@@ -2437,17 +2452,21 @@ Function nsDialogsMorePageLeave
2437
2452
FunctionEnd
2438
2453
2439
2454
Function un.onInit
2455
+ /*
2440
2456
CheckLang::CheckLang "0419"
2441
2457
pop $R0
2442
2458
${if} $R0 == "1"
2443
2459
!insertmacro MUI_LANGDLL_DISPLAY ;select language
2444
2460
${endif}
2445
-
2446
- /* Call un.GetUIId
2461
+ */
2462
+ Call un.GetUIId
2447
2463
pop$R0
2448
- ${if} $R0 == "1049 "
2464
+ ${if} $R0 == " 1251 "
2449
2465
; !define MUI_LANGDLL_ALLLANGUAGES
2450
2466
!insertmacro MUI_LANGDLL_DISPLAY; select language
2451
- ${endif}*/
2467
+ ${else}
2468
+ StrCpy $LANGUAGE ${LANG_ENGLISH}
2452
2469
2453
- FunctionEnd
2470
+ ${endif}
2471
+
2472
+ FunctionEnd