![]() |
#1 |
Junior Member
|
Localization of installer.
I'm trying to provide translations for messags inside my installer. So far I've had good sucess mostly, but somehow I'm not referencing these correctly or something.
Installer: http://wiki.worldwindcentral.com/World_Wind_Eta_Full_b1 And my translations (which I put in a Global.nsh file included in the installer.) http://wiki.worldwindcentral.com/Installer_Translations problem is when I save this file as ASCII, I lose the polish chars, and when I save as UTF-8 it crashes NSIS. Any suggestions? |
![]() |
![]() |
![]() |
#2 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Using Python, you can use:
It's surely possible with many other tools too.code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#3 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Can you please include an example that crashes makensis? I can not reproduce this.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#4 |
Junior Member
|
If I encode in anything but ASCII the file does not compile. It causes an error in line one. If I save it as ASCII it seems to work, however I'm having a problem with the fact that it's always using the English translations (all other languages are ignored.)
Sigh.. I'm also having problems with the line StrCpy $1 ".NET 1.1"$(Requirement1) It's empty every time ![]() This hasn't been my week. |
![]() |
![]() |
![]() |
#5 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Not being able to compile a script is not crashing.
Your StrCpy line has the quotes misplaced. Put the ending quote after the language string. The way you wrote it, $(Requirement1) specifies the maximum number of characters to copy from ".NET 1.1" into $1. Since it's a string with no numbers, it'll be translated to 0 and you'll always get an empty string. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#6 |
Junior Member
|
Ahh.. I had worked around the problem with two strCpy's
strCpy $0 ".NET 1.1" strCpy $1 $0$(Requirement1) I think your solution is more elegant though, I was unaware you could reference strings inside strings. Now the only problem I'm having is that the english is getting used regardless. ![]() I'll update the wiki to the latest Installer I'm using. Perhaps someone here can figure it out.. |
![]() |
![]() |
![]() |
#7 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
That's because, eventhough $LANGUAGE is changed in .onInit, it only takes affect after .onInit. You can put the message itself in .onGUIInit. I'd even do the check before asking the user for a language. No sense in letting the user down after the hard work of selecting the language
![]() One problem with .onGUIInit is that it won't be called in silent mode. So you have to check for silent mode in .onInit and abort if it's on. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#8 |
Junior Member
|
Thank you kichik, your explanation and another thread about the same problem got it all solved. I now have multiple languages
![]() |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|