Is there a way to support translations?

Anonymous user
Is there a way to support translations?

Is there a way to support translations? Normally in the script we would use someting like

${NSD_CreateLabel} 59u 72u 163u 13u $(SELECT_CPU_TEXT)

to use localized text.
This will not work with the Dialog Designer because it always enclose text associated with a control with quoation marks.

A extra option would be useful "use translation macro" or something similar... and when set, the text should be written as $(TEXT) without quotation marks

Posts: 1125
Joined: March 25, 2012 - 01:19
It already works

Composing a string by adding a variable inside a quited string is allowed in NSIS; the following code:

${NSD_CreateButton} 13u 68u 80u 23u "$(message)"

and creates a button with the content of "message" variable as caption.

You could also write:

${NSD_CreateButton} 13u 68u 80u 23u "prefix $(message) suffix"

and have the string automatically composed.

Please note that the lang string / variable must be defined before the line is executed.
If you tried this code into NSISDialogDesigner, the button appears with $(message) as caption, because the variable is not defined and there's no way to define it.
F5 will compile only a part of the script, no more that what's needed to give the user a visual preview of the form (see the content of %temp%\NSISDialogDesigner folder while the IDE is running).
Header, footer and custom script parts are not compiled because they could contain references to missing functions (included into your real script).

Just try a real script, define your language vars, include the .nsdinc file and it should work.
If it's not working, please send me your project (or at least a part of it).

Anonymous user
Yes, it's working! Very

Yes, it's working! Very great! (there was some bug with my macros)...

I wished only it has a editor so I must not switch every time between Eclipse and NSIS Dialog Editor :P

warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.