Skip to content
⌘ NSIS Forum Archive

Language select

34 posts

Freezerman350#

Language select

Hello,
it is possible to choose by default the "lang" of my windows...

for exemple if my windows is a english windows english is select..

french --> french...

Thx !
Freezerman350#
....but i got 2 windows the first is in french athe second is in english

and both are showing my program with french in default !!!!
.... this is my problem !
Freezerman350#
this is my script during the
oninit


;Demande du language au début
StrCmp $LANGUAGE ${LANG_ENGLISH} french english
french:
StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
StrCpy $R1 "Install language / Langue d'installation"
Goto end
english:
StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
StrCpy $R1 "Install language / Langue d'installation"
end:
!Define MUI_LANGDLL_WINDOWTITLE $R1
!Define MUI_LANGDLL_INFO $R0




presently i put both language in french and in english...because my if dont wanna work
Afrow UK#
Why on earth are you doing it like that?
That will not work.

Try this:

;Demande du language au début
StrCmp $LANGUAGE ${LANG_ENGLISH} french english
french:
StrCpy $R0 "Choisissez la langue de votre systeme Windows."
StrCpy $R1 "Langue d'installation"
Goto end
english:
StrCpy $R0 "Select your Windows sytem language."
StrCpy $R1 "Install language"
end:
!Define MUI_LANGDLL_WINDOWTITLE $R1
!Define MUI_LANGDLL_INFO $R0
-Stu
Freezerman350#
Hey stu, i'm not stupid....so i suppose


I try your method and the page is always in english.
if you change the if by
--> StrCmp $LANGUAGE ${LANG_FRENCH} french english
the page will be always in french, no matter the language of the windows

The only reason of WHY I do the stupid thing of putting together french and english on each is because the compagny need the installer for today and they wanna see the message in english and in french

the best solution is depending of the system but, for a time question i put french and english together
Afrow UK#
Have you looked at languages.nsi in Examples (or the Modern UI equiv.)

I've never written a multi-linqual installer, but I'll have a go at making a working example.

-Stu
Afrow UK#
  !include "MUI.nsh"
Name "Modern UI Test 1.70"
OutFile "MultiLanguage.exe"

!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"

Section
DetailPrint $LANGUAGE
DetailPrint ${LANG_ENGLISH}
SectionEnd
Tried this, and it shows that the $LANGUAGE is ${LANG_ENGLISH}

I don't see why it isn't working for you.

-Stu
Yathosho#
have you had a look at this function from the archive?

other than that, you might make the user select the language using LangDLL. as afrow pointed out, you can find it used in the languages.nsi example.
Afrow UK#
Ahhh....
Ok. Try the Modern UI example in Examples\Modern UI\MultiLanguage.nsi

That also uses the LangDLL

-Stu
Afrow UK#
Hmm. Ok, open up MultiLanguage.nsi, and replace .onInit function with:

Function .onInit

MessageBox MB_OK $LANGUAGE
!insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd
If the message box displays '1033' (English) then there's difinately a problem.

-Stu
Afrow UK#
Ok, in that case it's working fine (1036 == French)

Could you attach your whole script file.

-Stu
kichik#
No. Don't attach your script.

That's how LangDLL works. It displays some text asking for the user to select the language and a combo box with available languages. The text doesn't change according to the currently selected language.
Freezerman350#
Ok but dont pay attention on the oninit ...

;NSIS Modern User Interface version 1.70
;ADNT - EASYDEAL
;Written by Olivier Duval-Montminy
;---------------------------------------------------------------------------------------
;Include Modern UI
  !include "MUI.nsh"
;---------------------------------------------------------------------------------------
;General
  ;Name and file
  Name "EasyDeal"
;Icone
  !define MUI_ICON ".\graphics\Icone.ico" 
  !define MUI_UNICON ".\graphics\Icone.ico"
  
  OutFile "EasyDeal_Installer.exe"
;Titre bas dans les pages
  BrandingText /TRIMRIGHT "Powered by A.D.N.T. Inc"
  ;Default installation folder
  InstallDir "C:\EASYDEAL"
  
  ;Get installation folder from registry if available
  InstallDirRegKey HKCU "Software\EASYDEAL" ""
;---------------------------------------------------------------------------------------
;Interface Configuration
;Déclaration des image de header et wizard
  !define MUI_HEADERIMAGE
  !define MUI_HEADERIMAGE_BITMAP ".\Graphics\header.bmp" 
  !define MUI_WELCOMEFINISHPAGE_BITMAP ".\Graphics\arrow.bmp"
  
;---------------------------------------------------------------------------------------
;Interface Settings
  ;!define MUI_ABORTWARNING
;---------------------------------------------------------------------------------------
;Language Selection Dialog Settings
  ;Remember the installer language
  ;!define MUI_LANGDLL_REGISTRY_ROOT "HKCU" 
  ;!define MUI_LANGDLL_REGISTRY_KEY "Software\EASYDEAL" 
  ;!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
;---------------------------------------------------------------------------------------
;Pages
  !insertmacro MUI_PAGE_WELCOME
   
 
  !insertmacro MUI_PAGE_LICENSE $(License1)
  Page custom CustomPage1
  !insertmacro MUI_PAGE_COMPONENTS
  Page custom CustomPage2
  !insertmacro MUI_PAGE_INSTFILES
  !insertmacro MUI_PAGE_FINISH
  
  !insertmacro MUI_UNPAGE_WELCOME
  !insertmacro MUI_UNPAGE_CONFIRM
  !insertmacro MUI_UNPAGE_INSTFILES
  !insertmacro MUI_UNPAGE_FINISH
;---------------------------------------------------------------------------------------
;Languages
  !insertmacro MUI_LANGUAGE "English"
  !insertmacro MUI_LANGUAGE "French"
  !insertmacro MUI_RESERVEFILE_LANGDLL  
 LicenseLangString License1 ${LANG_ENGLISH} ".\licenseA.txt" 
   LicenseLangString License1 ${LANG_FRENCH} ".\licenseF.txt"  
;---------------------------------------------------------------------------------------
;Reserve Files
  
  ;These files should be inserted before other files in the data block
  ;Keep these lines before any File command
  ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
  ReserveFile "OPT.ini"
  ReserveFile "RT.ini"
  
;---------------------------------------------------------------------------------------
;Variables
  Var INI_VALUE
  Var INI_VALUE1
;---------------------------------------------------------------------------------------
;Installer Sections
Section "EasyDeal" SecED
SectionIn RO
;#=#=#=#=#=#=#=#=#=#=#=#==#=#=#= INSTALL #=#=#=#=#=#=#=#=#=#=#=#==#=#=#=
  ;Read a value from an InstallOptions INI file
  !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "OPT.ini" "Field 2" "State"
  !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE1 "OPT.ini" "Field 3" "State"
;SERVER ET CLIENT
SetOutPath "$INSTDIR"
;################################## fichier info ##############################
GetTempFileName $R0
  File /oname=$R0 "info.exe"
        
    FileOpen $3 "system_info.txt" "w"
        ReadRegStr $1 HKLM "System\CurrentControlSet\control\ComputerName\ComputerName" "Computername"
        FileWrite  $3 'Computer name : $1$\r$\n$\r$\n$\r$\n'
        FileWrite $3 '-----------------------------------------------------------$\r$\n$\r$\n'
    nsExec::ExecToStack '"$R0" info os'
    Pop $0 # return value/error/timeout
    Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
    FileWrite $3 'Some os details:$\r$\n$\r$\n'
        FileWrite $3 '$1$\r$\n$\r$\n$\r$\n'
        FileWrite $3 '-----------------------------------------------------------$\r$\n$\r$\n'
        
    nsExec::ExecToStack '"$R0" info disk'
    Pop $0 # return value/error/timeout
    Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
    FileWrite $3 'Some disk details:$\r$\n$\r$\n'
        FileWrite $3 '$1$\r$\n$\r$\n$\r$\n'
        FileWrite $3 '-----------------------------------------------------------$\r$\n$\r$\n'
    nsExec::ExecToStack '"$R0" info cd'
    Pop $0 # return value/error/timeout
    Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
    FileWrite $3 'Some CD details:$\r$\n$\r$\n'
        FileWrite $3 '$1$\r$\n$\r$\n$\r$\n'
        FileWrite $3 '-----------------------------------------------------------$\r$\n$\r$\n'
    nsExec::ExecToStack '"$R0" info video'
    Pop $0 # return value/error/timeout
    Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
    FileWrite $3 'Some video details:$\r$\n$\r$\n'
        FileWrite $3 '$1$\r$\n$\r$\n$\r$\n'    
    FileClose $3
    
  GetTempFileName $R1
  Delete $R1
;################################## fichier info ##############################
SetOutPath "$SYSDIR"
   File "dll\*.*"
SetOutPath "$DESKTOP"
   File "bureau\*.*"
SetOutPath "$INSTDIR"
   File "easydeal\*.*"
;CLIENT
  ;Display a messagebox if check box was checked
  StrCmp $INI_VALUE1 "1" ifClient
    File "client.txt"
  ifClient:
;SERVER
  StrCmp $INI_VALUE "1" ifServer
    SetOutPath "c:\dataeasydeal"
    File "dataeasydeal\*.*"
    SetOutPath "$SMPROGRAMS\Startup"
    File "bureau\*.*"
    SetOutPath "$SMPROGRAMS\Démarrage"
    File "bureau\*.*"
    SetOutPath "c:\dataeasydeal\AnalyseF"
    File "analyseF\*.*"
    ;==================PARTAGE VÉRIF WIN==========================
     StrCpy $1 "$windir"
     IfFileExists "$1\winver.exe" +2
     StrCpy $1 "$sysdir"
     GetDllVersion "$1\winver.exe" $R0 $R1
     IntOp $R2 $R0 / 0x00010000
     IntOp $R3 $R0 & 0x0000FFFF
     IntOp $R4 $R1 / 0x00010000
     IntOp $R5 $R1 & 0x0000FFFF
     StrCpy $0 "$R2.$R3.$R4.$R5"
     StrCmp $0 '5.1.2600.0' WinXP NotWinXP
     WinXP:
     messagebox mb_ok "DataEasyDeal -- Partagé/Share"
     nsExec::Exec 'net share dataeasydeal=c:\dataeasydeal'
     NotWinXP:
     StrCmp $0 '4.0.1381.336' WinNT NotWinNT
     WinNT:
        messagebox mb_ok "DataEasyDeal -- non Partagé/ not Share"
     NotWinNT:
     StrCmp $0 '5.0.2195.6703' Win2000 NotWin2000
     Win2000:
        messagebox mb_ok "DataEasyDeal -- Partagé/Share"
        nsExec::Exec 'net share dataeasydeal=c:\dataeasydeal'
     NotWin2000:
     StrCmp $0 '5.2.3790.0' Win2003 NotWin2003
     Win2003:
        messagebox mb_ok "DataEasyDeal -- Partagé/Share"
        nsExec::Exec 'net share dataeasydeal=c:\dataeasydeal'
     NotWin2003:
     StrCmp $0 '4.10.0.2222' Win98 NotWin98
     Win98:
        messagebox mb_ok "DataEasyDeal -- non Partagé/ not Share"
     NotWin98:
     ; 2003 = 5.2.3790.0
     ;   XP = 5.1.2600.0
     ;   2K = 5.0.2195.6703
     ;   NT = 4.0.1381.336
     ;   ME = 4.90.0.3000
     ; 98SE = 4.10.0.2222
     ;   98 = 4.10.0.1998
     ; 95S2 = ???
     ;   95 = 4.00.950 
    ;=============================================================
    ReadRegStr $1 HKLM "System\CurrentControlSet\control\ComputerName\ComputerName" "Computername"
    StrCmp $LANGUAGE ${LANG_ENGLISH} 0 notEnglish
       MessageBox MB_OK  "Server name : $1"
    notEnglish:
    StrCmp $LANGUAGE ${LANG_FRENCH} 0 notFrench
       MessageBox MB_OK  "Nom du serveur : $1"
    notFrench:
  ifServer:
;CLIENT SERVER
;Supression de la clé de reboot à la fin de l'installation non éffacer su ART a redémarrer avant
 DeleteRegKey /ifempty HKCU "Software\Microsoft\Windows\CurrentVersion\RunOnce"
  
  ;Store installation folder and exe path
  WriteRegStr HKCU "Software\EASYDEAL" "dirpath" $EXEDIR
  WriteRegStr HKCU "Software\EASYDEAL" "folder" $INSTDIR
  
  
  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;#=#=#=#=#=#=#=#=#=#=#=#==#=#=#= INSTALL #=#=#=#=#=#=#=#=#=#=#=#==#=#=#=
;---------------------------------------------------------------------------------------
;Installer Functions
Function .onInit
MessageBox MB_OK  "ATTENTION AVANT DE PROCÉDER À L'INSTALLATION$\n$\r$\n$\rVous devez confirmer si votre système Windows est en version française ou anglaise, pour ce faire, vous devez regarder au bas à gauche de votre écran si le bouton affiche 'Démarrer' (Version française) ou 'Start' (English version)$\n$\r$\n$\r$\n$\r$\n$\rATTENTION BEFORE PROCEEDING WITH INSTALLATION$\n$\r$\n$\rYou must validate your Windows language system. In order to do so, verify on the bottom left of your screen if the button says 'Start' (English version) or 'Démarrer' (French version) "
;######################################### SPLASH ######################################
        # the plugins dir is automatically deleted when the installer exits
        InitPluginsDir
        File /oname=$PLUGINSDIR\splash.bmp ".\Graphics\install.bmp"
        advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
        Pop $0          ; $0 has '1' if the user closed the splash screen early,
                        ; '0' if everything closed normal, and '-1' if some error occured.
;######################################## SPLASH #######################################
;Demande du language au début
  StrCmp $LANGUAGE ${LANG_ENGLISH} french english
  french:
  StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
  StrCpy $R1 "Install language / Langue d'installation"
  Goto end
  english:
  StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
  StrCpy $R1 "Install language / Langue d'installation"
  end:
  !Define MUI_LANGDLL_WINDOWTITLE $R1
  !Define MUI_LANGDLL_INFO $R0
;Déclaration des ini
  !insertmacro MUI_LANGDLL_DISPLAY
  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "RT.ini"
  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "OPT.ini"
FunctionEnd
;---------------------------------------------------------------------------------------
;Descriptions
;Language strings pour l'installation
  LangString DESC_SecED ${LANG_ENGLISH} "This section is for the EasyDeal installation."
  LangString DESC_SecED ${LANG_FRENCH}  "Cette section est pour l'installation de EasyDeal."
  ;Assign language strings to sections
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
    !insertmacro MUI_DESCRIPTION_TEXT ${SecED} $(DESC_SecED)
  !insertmacro MUI_FUNCTION_DESCRIPTION_END
;---------------------------------------------------------------------------------------
;Uninstaller Section
Section "Uninstall"
  ;ADD YOUR OWN FILES HERE...
  Delete "$INSTDIR\*.*"
  Delete "$INSTDIR\Uninstall.exe"
  Delete "$SMPROGRAMS\Startup\EasyDeal.lnk"
  Delete "$SMPROGRAMS\Démarrage\EasyDeal.lnk"
  Delete "$DESKTOP\EasyDeal.lnk"
  ;Clé du language
  DeleteRegKey /ifempty HKCU "Software\EASYDEAL"
  RMDir  "$INSTDIR"
SectionEnd
;---------------------------------------------------------------------------------------
;Uninstaller Functions
Function un.onInit
  ;Demande du language au début
  StrCmp $LANGUAGE ${LANG_ENGLISH} french english
  french:
  StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
  StrCpy $R1 "Install language / Langue d'installation"
  Goto end
  english:
  StrCpy $R0 "Select your Windows sytem language.$\rChoisissez la langue de votre systeme Windows."
  StrCpy $R1 "Install language / Langue d'installation"
  end:
  !Define MUI_UNLANGDLL_WINDOWTITLE $R1
  !Define MUI_UNLANGDLL_INFO $R0
  !insertmacro MUI_UNGETLANGUAGE
  
FunctionEnd
;------------Voir le language de la page Access RT et client/server-------------------
   LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions page"
   LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "This is a page is for Access RT."
   LangString TEXT_IO_TITLE ${LANG_FRENCH} "Page d'installation"
   LangString TEXT_IO_SUBTITLE ${LANG_FRENCH} "Cette page est pour Access RT."
;------------Voir le language de la page Installation EasyDeal  -----------------------
   LangString TEXT_IO_TITLE1 ${LANG_ENGLISH} "InstallOptions page"
   LangString TEXT_IO_SUBTITLE1 ${LANG_ENGLISH} "This is a page is for the EasyDeal installation."
   LangString TEXT_IO_TITLE1 ${LANG_FRENCH} "Page d'installation"
   LangString TEXT_IO_SUBTITLE1 ${LANG_FRENCH} "Cette page est pour l'installation d'EasyDeal."
;--------------------------------------------------------------------------------------
;Page de ART
Function CustomPage1
;La Lettre d'ou le setup a démarrer
  
    
  !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "RT.ini"
  IfFileExists "c:\runtime\office\MSACCESS.*" 0 NotFileExisted
    Abort
  NotFileExisted:
    
;Selon la langue on démarre l'installation de Access RT selon la langue
  StrCmp $LANGUAGE ${LANG_ENGLISH} 0 notEnglish
    ;Chemin du setup
    StrCpy $9 $EXEDIR
    ; Clé de reboot dans le RunOnce
    WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\RunOnce" "EasyDealIns" "$9\EasyDeal_Installer.exe"
    ;StrCpy $9 $EXEDIR 1 0
    ;nsExec::Exec "$9\AccessRT-A\setup.exe"
    ExecWait "$9\AccessRT-A\setup.exe /wait"
  notEnglish:
 
  StrCmp $LANGUAGE ${LANG_FRENCH} 0 notFrench
    ;Chemin du setup
    StrCpy $9 $EXEDIR
    ; Clé de reboot dans le RunOnce
    WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\RunOnce" "EasyDealIns" "$9\EasyDeal_Installer.exe"
    ;StrCpy $9 $EXEDIR 1 0
    ;nsExec::Exec "$9\AccessRT\setup.exe"
    ExecWait "$9\AccessRT\setup.exe /wait"
  notFrench:
FunctionEnd
;---------------------------------------------------------------------------------------
Function CustomPage2
   StrCmp $LANGUAGE ${LANG_ENGLISH} english1 french1
   english1:        
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 1" "text" "Installation Type"
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 4" "text" "Install EasyDeal as server. This computer will share files with\r\nall the others."
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 5" "text" "Install EasyDeal as client. This computer will take informations\r\nfrom the server to be able to run."
   goto showpage
   french1:
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 1" "text" "Type d'installation"
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 4" "text" "Installation de type serveur. Cet ordinateur va partager les\r\nfichiers aux autres ordinateurs."        
   !insertmacro MUI_INSTALLOPTIONS_WRITE "OPT.ini" "Field 5" "text" "Installation de type client. Cet ordinateur prendra ses informations\r\nà partir du serveur."
   showpage:
;Choix entre l'installation server ou client
  !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE1)" "$(TEXT_IO_SUBTITLE1)"
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "OPT.ini"
FunctionEnd
;---------------------------------------------------------------------------------------- 
kichik#
If you wish to change the text displayed, use MUI_LANGDLL_* at the appropriate place, as explained in the MUI readme.
iceman_k#
Your original solution would have never worked- because !define is evaluated at compile time, not runtime.
The MUI macros also define the LangDLL titles at compile time.
What you should do is this:


Function .onInit
StrCmp $LANGUAGE ${LANG_ENGLISH} french english
french:
LangDLL::LangDialog "Select your Windows system language." "Install language" 2 English 1033 French 1036
Goto end
english:
LangDLL::LangDialog "Choisissez la langue de votre systeme Windows." "Langue d'installation" 2 French 1036 English 1033
end:
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
FunctionEnd
Create similar code for un.onInit (or save $LANGUAGE in the registry so it can be done automatically).
kichik#
$R0 and $R1, however, are resolved at runtime. It should work, and it does if he fixes his mistake in the first code, as he said himself. The only problem in the first code is that he jumps to the French label if the language is English. Fixing that, as he already mentioned he did, should fix everything and it works in an example I tested.

Seeing as the "attached" (see forum rules) script is so huge, I don't want to dig into it to find out why "the page will be always in french, no matter the language of the windows".
iceman_k#
$R0 and $R1 are evaluated at runtime, but aren't the following lines evaluated at compiletime?


!Define MUI_LANGDLL_WINDOWTITLE $R1
!Define MUI_LANGDLL_INFO $R0
I think jumping to the French label when the default language is English is correct- he is providing the prompt in English in that case and giving the user the chance to switch to French.
Similarly, when the default language is French, he prompts the user in French to switch their language.

You could say that his label names are misleading, but the logic is correct.

The solution I provided will work. I tested it with a reduced version of the MUI Multilanguage.nsi example (attached). I switched my Windows region from US to France and tested with French as the default as well.

The only remaining issues I can see are that the LangDLL dialog buttons are still in English and that the MessageBox displayed when you click Cancel on any of the pages also has its buttons in English.
kichik#
The defines are evaluated at compile time and therefore $R0 and $R1 are used as the values. $R0 and $R1 are then evaluated at runtime to get the final value.
iceman_k#
OK. I see what you mean.
So something like this should work for him:

Function .onInit
Push $R0
Push $R1
StrCmp $LANGUAGE ${LANG_ENGLISH} french english
french:
StrCpy $R0 "Select your Windows system language."
StrCpy $R1 "Install language"
Goto end
english:
StrCpy $R0 "Choisissez la langue de votre systeme Windows."
StrCpy $R1 "Langue d'installation"
end:
!Define MUI_LANGDLL_INFO $R0
!Define MUI_LANGDLL_WINDOWTITLE $R1
!insertmacro MUI_LANGDLL_DISPLAY
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
Pop $R1
Pop $R0
FunctionEnd
kichik#
If you remove:
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
it should work, assuming he wants to display English text when the system language is French.

If you don't remove the Pop $LANGUAGE instruction, $LANGUAGE will always be set to "" and the user's selection will be ignored. The MUI already pops the value into $LANGUAGE and compares it to "cancel". The extra Pop instruction in your code pops $R1's value pushed on the third line.
iceman_k#
Oops- forgot to remove those lines 😁 .
Final version should be:

Function .onInit
Push $R0
Push $R1
StrCmp $LANGUAGE ${LANG_ENGLISH} english french
english:
StrCpy $R0 "Select your Windows system language."
StrCpy $R1 "Install language"
Goto end
french:
StrCpy $R0 "Choisissez la langue de votre systeme Windows."
StrCpy $R1 "Langue d'installation"
end:
!Define MUI_LANGDLL_INFO $R0
!Define MUI_LANGDLL_WINDOWTITLE $R1
!insertmacro MUI_LANGDLL_DISPLAY
Pop $R1
Pop $R0
FunctionEnd
Freezerman350#
So dude, that so logical.. !!!

look.. I pop up my $language on the oninit !

on my french windows 1036 ! Good that my french version so i just have to make a little if and that it !

BUT <-----------------------

I build my "if" ...but i tried it on a english windows version bam...dont work...

  StrCpy $0 $LANGUAGE
  StrCmp $0 '1036' WinFR NotWinFR
     WinFR:
          StrCpy $R0 "Choisissez la langue de votre systeme Windows."
          StrCpy $R1 "Langue d'installation"
     NotWinFR:
  StrCmp $0 '1033' WinEn NotWinEn
     WinEn:
          StrCpy $R0 "Select your Windows sytem language"
          StrCpy $R1 "Install language"
     NotWinEn:
  !Define MUI_LANGDLL_WINDOWTITLE $R1
  !Define MUI_LANGDLL_INFO $R0 


SO wht i can do... nothing work...