- NSIS Discussion
- Please allow other languages
Archive: Please allow other languages
nsfis
18th October 2001 08:37 UTC
Please allow other languages
NSIS now allows to specify most of the texts that appear in dialogs, but not all of them. I think, it would be very usefull for lot of people to be able to localize NSIS without the need to modify NSIS sources (i.e. just by instructions in NSIS script). For the first run (when I forget texts in details view that can be disabled by "ShowInstDetails nevershow"), it would be sufficient to allow the localization of ten (eleven) texts, mostly butons and the specification of the font (or font script: Western, Central European, Hebrew, Baltic, Greece etc.) for the background window.
Here are the hardcoded texts:
Buttons:
-------
I Agree
< Back
Next >
Cancel
Browse...
Install
Uninstall
Close
Show details - only because of current behaviour, see bellow
Other texts:
------------
Space required
Space available
Would it be usefull for other users?
By the way, "ShowInstDetails nevershow" is working only in Installer, not in Unisntaller - I can't get rid of "Show details" button in Uninstaller.
Repzilon
18th October 2001 11:23 UTC
At this time, translating NSIS needs to edit the source (which is, of course, easy to get). I am actually translating v1.57 (I know 1.59 is out, but I will not restart again) in French, after I put Edgewise extensions into it.
Progress status :
MakeNSIS: 100 %
Zip2Exe: 100 %
Documentation : 12 %
Scripts : 0 %
nsfis
18th October 2001 16:59 UTC
Repzilon,
localization of source files has two disadvantages:
1) New versions of NSIS come very often and you have to repeat your work over and over again because language specific texts are not gathered in one place.
2) Only a programmer with Visual C++ can do this.
DuaneJeffers
18th October 2001 17:57 UTC
But, it was until recently that Justin had been working hard on NSIS. AND, some of the fixes are just minor (not with 1.59), and it is very easy to convert over. Sometimes it has just minor coding fixes and it is very very very easy to convert over.
Now, if you have some versions of NSIS and you want to help out other developers, then submit them to the NSIS Project House!!!!!
-Duane
pjw62
18th October 2001 18:06 UTC
Perhaps if you asked Justin extremely nicely and did all the updating for him so he only had to sync. his copy of the source code with the one you supplied, he would make all the texts in resources and files a #define in a file like 'language.h' .. ?
Edgewize
19th October 2001 07:40 UTC
Better solution - runtime string loading. Probably with a new optional .NSI directive for language pack files.
I will come up with a very generic low-overhead solution for this tonight. I'm bored but not tired :)
-- Edgewize
crish
19th October 2001 11:27 UTC
ok i've compiled a german version of nsis but its VERY ugly
because the strings (like agree) are directly on the
items
it would be much better to use variables and to have these variables in a special file
then it would be much easier to change the lang. ans perhaps to
make lang.xml files
phre0n
20th October 2001 03:26 UTC
Try this to get rid of the ShowDetails in the unistall
Section "Uninstall"
SetDetailsView "nevershow"
I would personally like a japanese version of it.
pjw62
21st October 2001 12:00 UTC
Edgewize, do you mean updating the string list resource of the exe header when 'makingnsis' or storing the strings in the code at the end of the final exe file ?
I was thinking if the text was set to something really obscure like 'NSISSTRINGCODE001' in the exe file in non unicode, as long as these were defined as say 256 character arrays when the makensis is run, it could search in the exe header and update these texts with no fear of buffer overrun.
Edgewize
21st October 2001 21:35 UTC
Right now I have MakeNSIS add the localized strings to the internal string table with pre-defined ID numbers, and then the EXE header extracts them before running .onInit and uses them instead of the default english strings.
It's a little bit kludgy, though, since it doesn't translate any of the loading error messages or the Verifying Executable... window (for large installers).
An alternative is to teach MakeNSIS how to update a Windows EXE resource section (its pretty easy) and then have it replace all the strings inside of EXEHEAD. (EXEHEAD would also need to use LoadString to get all its text from the resource file.)
I like the second approach better, so I've started work on that in my spare time. I'll integrate it into 1.60 when the final version comes out and send it to Justin.
pjw62
21st October 2001 23:32 UTC
mail me if you need any help.
pjw62
21st October 2001 23:35 UTC
not that I was for a moment proposing you were incapable.. just offering.. :)
Edgewize
21st October 2001 23:52 UTC
Thanks for the offer :) I've got this one covered, though. I once did something like it for my own program so I have a great example to work off.
Edgewize
22nd October 2001 06:07 UTC
DOH!
Hah, Justin beat me to it :p
Check out the example .NSH files in NSIS 1.60beta2
nsfis
22nd October 2001 15:28 UTC
Great, Justin!
International versions of NSIS installers can be made easily now.
To be perfect, two details are missing:
1) ability to specify font and character set for the background window text (now Garamond, ANSI_CHARSET)
2) one hardcoded text left out: "verifying installer x%" (I mention this only for completeness - this is not so important, user notices this text only in big installers loaded from slower media)
Thank you!
Edgewize
22nd October 2001 19:23 UTC
The Verifying... text is displayed before the EXE has been parsed and the string table loaded, so it might not be possible using the current method.
crish
24th October 2001 09:18 UTC
ok i'm happy .
now i can include my favorite button texts
in my nsi file
(with help from the samples included in the 1.6 beta)
this works fine, i dont need to recompile my nsis on every new version that out
only one thing is left :
the details are in english, so :
please allow to change the copying and so in there to be changed too !!!!
Repzilon
25th October 2001 01:47 UTC
Another problem
With these header files, the error messages are not translated unfortunately. So, there is some source to translate left.