|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Hello,
I'm trying to use the '!insertmacro MUI_LANGUAGE "myLMang"' in a specific way. First i have one install which store the language the user chose. PHP Code:
So I want insert the right language in the script (here " !insertmacro MUI_LANGUAGE "English" " My problem is that I can't use this macro in a function and I can't use switch case out of a function. Does anyone got an Idea to help my poor brain...? Here's my code: PHP Code:
|
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
I am not sure what you are trying to do.
You have two installers. The first one offers a choice of languages (English and French?). This installer stores the selected language in the registry. After you have run the first installer you want to run another installer. The second installer is to use whatever language was selected when the first installer was run. I think your problem is that you do not know how to make the second installer use the correct language. Have you looked at the multi-language MUI example that comes with NSIS? Try compiling the Examples\Modern UI\MultiLanguage.nsi script to make the MultiLanguage.exe demo installer. The first time I ran MultiLanguage.exe on my English version of Windows it showed a language selection dialog with "English" pre-selected. I used the dialog box to select "French" and ran the demo installer (and all the pages were in French). After the installer finished, I ran MultiLanguage.exe again. This time it did not show the language selection dialog so the very first thing that appeared was the License page and that was all in French (even though I was running it on an English version of Windows). This happened because the installer was using the language setting stored in the registry. |
|
|
|
|
|
#3 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
leave your macros outside the section, where they belong. to switch the language you just need to do this:
code: i guess you have to use this before your GUI is initialized (onInit or onGUIInit). unless you need the language stores in the registry permanently, i think it's good practice to execut second installer with a parameter (mySetup.exe /L=1033). http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.12 Last edited by Yathosho; 3rd October 2009 at 18:14. |
|
|
|
|
|
#4 | ||
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Quote:
Quote:
Use the switch /L with the installer is a good advice. I'll try it. But at this time it's an external program (i.e. I can't handle it) which calls my second installer. Thank you both. I'll be back to tell you if i can find a fix
|
||
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Ok, It's working now.
What I have done in the second installer is: Put these lines: PHP Code:
PHP Code:
According to the MUI documentation: !If you want the installer to display a language selection dialog (see the the MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in the .onInit function So i don't understand why I have to insert this code, because I don't want the language listBox. And in this case it's not shown... Did I miss something? Anyhow, it's working now. Thank You. |
|
|
|
|
|
#6 | ||
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
Quote:
There is another MUI setting you can use if you ALWAYS want the language selection dialog to appear. See the MUI readme: Quote:
Last edited by pengyou; 5th October 2009 at 10:34. |
||
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Sep 2009
Posts: 17
|
Damn,
I did not read the entire section. Sorry about that. |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
Don't worry about that. I have read the documents lots of times and still find new things in them.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|