|
|
#1 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
Setting the language on .myGuiInit
I saw I think every thread about this. I understood that I can get parameters in .myGuiInit with ${GetParameters}. When I run a .exe file from another setup I write this
code: because I want that myexefile.exe is of the same language of the main setup. in myexefile.exe in .myGuiInit function I wrote this code code: In $0 variable I find the language code sent by exec for example for italian I found 1040, for spanish 1034 of for french 1036 anyway I found the right code of the chosen language. I tried setting $LANGUAGE with this code or with ${LANG_SPANISH} if I found the spanish code but this way doesn't work. Installation files page is shown in italian.(my OS language) How can I make the language change according to the code in .myGuiInit? I hope I was clear my english sucks Thnks |
|
|
|
|
|
#2 |
|
Forum King
|
1. i'd probably add a switch to make sure you get only the language code (eg /L=$LANGUAGE)
2. according to languages.nsi, you should set the language in the onInit function |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
So have I to load the correct language file corresponding to the input language code?
Edit: I didn't say I am using MUI_LANGDLL_DISPLAY onInit to set the installer language |
|
|
|
|
|
#4 | |
|
Forum King
|
Quote:
or ;commandline should contain /L=<LANG_ID> ${GetParameters} $0 ${GetOptions} $0 "/L=" $LANGUAGE |
|
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
|
|
|
|
|
|
#6 | |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
Quote:
If I chose spanish in $0 I find 1034 and writing StrCpy $LANGUAGE $0 the installer remain in italian. I can't understand where I am wrong |
|
|
|
|
|
|
#7 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
Function .onInit
StrCpy $LANGUAGE 2057 ;to set the english setup language does not work FunctionEnd or Function .onInit ${GetParameters} $0 ${GetOptions} $0 "/L=" $LANGUAGE FunctionEnd I think $0 must contain <LANG_ID> (for example 1040,2057 it depeds) but it's empty. So how can i get it work? |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
How have you run your setup executable? As Yathosho says you need to give it /L=#.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#9 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
I run ExecWait '"MySetup.exe" <LANG_ID>' without /l. I thought it was the same retrieving the <LANG_ID> on .onInit function and put it in $LANGUAGE without look for /l. Ok now it works with
ExecWait '"mysetup.exe" /l $LANGUAGE' and onInit ${GetOptions} $0 /l $LANGUAGE but If I chose French when I exec mysetup.exe I found in $LANGUAGE 1036 (french lang_id), but mysetup.exe is in english -.-'' and my OS is italian. Mmm boh. ![]() Am I forgetting something? Edit: When I run mysetup.exe I found the right languade id onInit but then I checked again $LANGUAGE while installation is in progress and I found 1033 (english U.S.) I tried with different languages and the result is the same. I found during the installation 1033. I think I am forgetting something to set the language. Another clarification... I am using Unicode nsis. If it makes some difference Last edited by bennaloz; 25th January 2012 at 09:05. |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Look at section 4.10.1 in the manual.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
Already read it.Infact my first language is english like it sais. I am sorry I was sure english means UK english and not US english. Now I tried to print $LANGUAGE if I chose english and it's 1033. Solved. I didn't put !insertmacro MUI_LANGUAGE in every setup -.-'' I didn't think it was necessary surely you thought it was obvoius. Thanks for the patience. Anyway How can I load UK English? I checked in MultiLanguages.nsi but I found only English (1033 is US english while 2057 is UK english).I should need 2057. Do you know or somebody else know it?
|
|
|
|
|
|
#12 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
You need to create your own nlf and nsh file for it (you can submit it as well in the translations forum).
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#13 |
|
Member
Join Date: Jan 2012
Location: Treviso
Posts: 61
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|