Archive: MultiLanguage in CustomDialog?


MultiLanguage in CustomDialog?
Hello Community.

I got a little problem here. I am requested to write a MultiLanguage installer. No problem - until yet. I have to build a custom dialog asking for a directory. This Dialog has to be in English, French, Italia, German and Spanisch. I localized the TopText and SubTopText with no problem. But how do I localize the Contenttext. And how do I put a variable I already used (eg. in registry) back to as "browse dir" text?

The Dialog shows like this:

TOP
SubTOP

Please select the right directory (<- this must be localized)

[ C:\ADirectoryName ] [...]

[Cancel] [Previous] [Next]

What I also want to do is to read the RegistryString and put it as the Directoryname instead of "ADirectoryName". How is that possible?

Thank you very much for your help. Please note, I searched a lot and found nothing. Maybe I was using the wrong keywords while searching. Nevertheless, please can somebody could help me out?

With best regards,
dbach


before you show the custom page use LogicLib.nsh:
${If} $LANGUAGE == ${LANG_ENGLISH}
writeinistr (the string for the specified control)
${ElseIf} other language
writeinistr etc


Originally posted by Red Wine
before you show the custom page use LogicLib.nsh:
${If} $LANGUAGE == ${LANG_ENGLISH}
writeinistr (the string for the specified control)
${ElseIf} other language
writeinistr etc
Once again - thanks Red Wine.

One little thing ... where is the customDialog.ini extracted to so that I can change it before loading it? Is it $PLUGINSDIR\customDialog.ini?
I've never changed a dialog on runtime so I am really sorry for that stupid question.

Yes, the $Plugindir is possible depends on your script ;)

Take a look at MoreInfo plugin multilanguage example (Wiki search)


Once again - thanks Red Wine.

One little thing ... where is the customDialog.ini extracted to so that I can change it before loading it? Is it $PLUGINSDIR\customDialog.ini?
I've never changed a dialog on runtime so I am really sorry for that stupid question.
you welcome :-)
your custom page ini is extracted in $PLUGINSDIR i.e
is good way to extract it in .onInit function
initpluginsdir
file /oname=$PLUGINSDIR\mycustom.ini 'local path\mycustom.ini'
when your installer is unloaded $PLUGINSDIR and everything inside it removed.
So you have the custom ini inside $PLUGINSDIR and just before the page is about to load in memory, when the custom page show function is starting, you are able to change controls and show the localised page.

It works - pretty good. Thanks a lot. :-)