New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installer language is Afrikaans instead of English on Windows Server 2016. #7574
Comments
That's not Dutch but Afrikaans. Because of its name (or its iso-code "af") it's probably the first language in the language list. |
Thank you - I've changed the description and title. |
I wish to add to this instead of filing another duplicate. Locale is Icelandic, display language is Icelandic, I used winget to install Notepad++ 8.4.7 and it installed with an Afrikaans display language. Which of course is useless to me ( and 99.999% of the people in Iceland as we don't speak Afrikaans - in favor of Icelandic, English, Swedish and Danish.) And this has been the case as long as I can remember. Notepad++ does not have a sane default in the installer - instead it's "select your poison or suffer the consequences" - which would be quite all right if the default demographic was South Africa. It is the same if you aimlessly click through the GUI installer (which is in fact what winget does - which is WHY the default MUST be fixed.) |
I experienced this issue today with 8.5.1 x64 on Windows 10 - the installer skipped the language selection and jumped straight into Afrikaans. |
The installer x86 & x64 which contain the fix of this issue (#14125) are available here: They are the latest version 8.5.7 and binaries are signed. |
If Afrikaans (1078) is saved in the registry from a previous install, then it is read as a supported LCID (Language Code Identifier). A x64 registry entry that has saved Afrikaans:
Is a supported installer language so the current PR code allows it. Installing in English would overwrite the registry value for future installs. On the A system without the saved registry value should not show Afrikaans unless NSIS detects it as LCID 1078 initially. An unsupported LCID, like a English variant that is not US English (1033) or other unsupported LCID should be displayed as US English (1033). |
The problem seems to be caused by McAfee: #7574 (comment) So the issue is closed. |
I appreciate the effort you put into this product for such a long time, but seriously, 👆that part needs some work. No, the bug isn't caused by McAfee - you are pretending causation by correlation. I don't have McAfee or any other third-party virus scanner on any of my machines - so it would have been prudent to at least ask others in this thread if they used McAfee or not - and if they (everybody) did, re-try without McAfee active. But whatever, this bug hindered using winget to install and thus hindered automatic updates. And that was almost a year ago. As I'm not inclined on offering NPP in Afrikaans to my clients or users, I simply solved it by using VS Code wherever and it turned out for the better. So don't lose a beat on my account. |
@TotiTolvukall |
I would not call it a failure of the language selector as it is intended behaviour. It's default mode is automatic and so it decides to show or not show based on conditions. The installer can force the language selector to show by defining
A minimal test script may help to show some light. Click to view test script;!define FIX
; Include Modern UI
!include "MUI.nsh"
; Properly display all languages
Unicode true
; Name and file
!ifdef FIX
Name "Fix"
OutFile "LanguageFix.exe"
!else
Name "Bug"
OutFile "LanguageBug.exe"
!endif
; Request application privileges
RequestExecutionLevel user
; Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
; Languages
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Afrikaans"
!insertmacro MUI_RESERVEFILE_LANGDLL
Section "Install"
SectionEnd
Function .onInit
; debug: *** set UK English as unsupported language ***
StrCpy $LANGUAGE "2057"
MessageBox MB_OK "Before: $LANGUAGE (UK English)"
!ifdef FIX
Call unsupportedLanguageToEnglish
!endif
!define MUI_LANGDLL_ALWAYSSHOW
!insertmacro MUI_LANGDLL_DISPLAY
; debug: *** Display language to use ***
MessageBox MB_OK "After: $LANGUAGE"
FunctionEnd
!ifdef FIX
Function unsupportedLanguageToEnglish
${Switch} $LANGUAGE
${Case} ${LANG_AFRIKAANS}
${Case} ${LANG_ENGLISH}
; language is supported
${Break}
${Default}
; set language to English
StrCpy $LANGUAGE ${LANG_ENGLISH}
; debug: *** Alert language unsupported ***
MessageBox MB_OK "Language is unsupported.$\nChanged language to English"
${Break}
${EndSwitch}
FunctionEnd
!endif The 1st line of the script has a commented
Can you to reproduce this behaviour? As for the saved language in the registry from previous Notepad++ installs, that is a symptom from the installer that failed to handle unsupported languages and as a result defaulted to Afrikaans. Once done, how to recognize Afrikaans mistake from Afrikaans actual with the installer. The solution to correct by the installer might be a temporary brutal fix, though perhaps it may be needed to close this issue. Something like this for several releases to clear the registry value Click to view code excerpt ReadRegStr $tempLng HKLM "SOFTWARE\${APPNAME}" 'InstallerLanguage'
${IfNot} ${Errors}
${If} "$LANGUAGE" != "${LANG_AFRIKAANS}"
${AndIf} "$tempLng" == "${LANG_AFRIKAANS}"
DeleteRegValue HKLM "SOFTWARE\${APPNAME}" 'InstallerLanguage' ; tmp fix
${Else}
StrCpy $LANGUAGE "$tempLng" ; set default language
${EndIf}
${EndIf} and then revert it back so that the users who prefer the Afrikaans language get control back. |
I couldn't - and moreover, I found that although NPP had been installed with English as the primary language, it still pointed to Afrikaans in the registry. I do however have a suggestion that might mitigate the problem for those that use winget or other auto-click installation methods - allow a "--language=[language token]" like "--language=en" and if someone tries "--language=unsupported_language" then you'd exit with error and "Unsupported language" message to the user. That might at least (if supported by the installation framework) take the cap off of the problem. |
I can't reproduce McAfee causing issues on 8.5.1 or 8.5.7 anymore, guessing something changed in newer McAfee definitions. As a test for @TotiTolvukall's issue, I installed the Icelandic language pack on a test Windows 10 VM, changed the current user and system language to Icelandic and can reproduce getting Afrikaans as the initial language selection on the installer. This is reproducible on both 8.5.1 and 8.5.7. Could this be because Icelandic is specifically commented out here for some reason and so isn't being considered a valid installer language? In case anyone else wants to go on a fun adventure through the NSIS code... For the Notepad++ installer, the first language in the list happens to be Afrikaans: |
I have tried to set English as default value while the detection is failed. Could you try the following binaries please? |
Any news about it? |
@TotiTolvukall |
A minimalist variant of the previous PR. Fix notepad-plus-plus#3844, fix notepad-plus-plus#7574, close notepad-plus-plus#14224
Description of the Issue
The Notepad++ installer instead of English is shown in Afrikaans. Afterwards also the notepad++ is shown in this language.
Language and regional settings on Windows 2016 OS are set to US (English).
Found similar closed bug: #3844
and
https://community.notepad-plus-plus.org/topic/14564/dutch-as-install-language-instead-of-english
Steps to Reproduce the Issue
Expected Behavior
Installer is shown in English (like other installers on US/English OS).
Actual Behavior
Installer is shown in Afrikaans, also the installed application defaults to it.
Debug Information
Windows Device Guard is active on this system.
The text was updated successfully, but these errors were encountered: