Archive: Custom Page multilanguage


Custom Page multilanguage
Hi,
I have developped an installer that supports multilanguage.
I have defined my language files as described in http://nsis.sourceforge.net/Creating...ating_with_MUI
But I open my inifiles like this:
File /oname=$PLUGINSDIR\MyInstallTypePage.ini "MyInstallTypePage.ini"
With this method it doesn't work. It doesn't show labels texts and so on.
But I muss use this method because I need the HWND variable.
Can somebody help me!!
Thanks for any help!!


Hi mamilo!

Sorry, I don't get it. What would you like to do? Do you want to use the strings of the language file in the custom dialog?

If you want to do that, you have to write them into the INI file before showing the dialog (WriteINIStr).

This will help you:
http://nsis.sourceforge.net/Docs/Mod...ml#customPages

Have a nice day!

Cheers

Bruno


Hi Bruno,
thanks for your response but it is not what i want to do. I want an installer that supports many languages. I have some custom Pages. I want to display in each custom Page the text in the choosed language. I use the method described in http://nsis.sourceforge.net/Creatin...rating_with_MUI.
My problem is: since I open my ini files like this:
File /oname=$PLUGINSDIR\MyInstallTypePage.ini "MyInstallTypePage.ini"
When I write:
assume $someText = "Hello"
MUI_..._WRITE $PLUGINSDIR\MyInstallTypePage.ini "Fieldx" "Text" "$(someText)"
"Hello" doesn't appear in the page when I run the installer. So I don't know what is the problem! Maybe there is an another method to do that?
I hope it is clearer!


mamilo


Could you post the code?

And, as far as I know, you don't have to include $PLUGINSDIR

MUI_..._WRITE MyInstallTypePage.ini "Fieldx" "Text" "$(someText)"

is enought.

Extracting the ini file can be done with

MUI_INSTALLOPTIONS_EXTRACT

http://nsis.sourceforge.net/Docs/Mod...UI/Readme.html

Cheers

Bruno


Hi Bruno,
I know that I can use MUI_INSTALLOPTIONS_EXTRACT to extract the ini file. But in my custom page I want to make
a FileRequest field depending on a RadioButton. So I muss extract my ini files with the another method (Exemple in exemple\InstallOptions\testnotify).

Mamilo


Hi mamilo!

Well, as far as I know there's no need for a special treatment of the ini file in that case.

Cheers

Bruno


Hi, I assume you did not forget to define your LangStrings:


LangString SomeText ${LANG_GERMAN} "Deutscher Text"
LangString SomeText ${LANG_ENGLISH} "English text"
(...)


After that, you can make a reference to your string by using $(SomeText)

For example:

WriteINIStr "$PLUGINSDIR\MyInstallTypePage.ini" "Field 1" "Text" $(SomeText)

(or take the MUI_..._WRITE equivalent)

I change the texts of my custom dialogs according to the chosen language in the page creator function.

HTH,
Jens


Also take a look here,

http://nsis.sourceforge.net/MoreInfo_plug-in

The Multilanguage example is probbably exactly what you want.


Hi Bruno,

I have developped something like in the example in InstallOptions/testnotify.nsi. I see in the example something like: "In this mode InstallOptions returns the window handle so we can use it".
So I use th same method!!

Regards,

mamilo


install in root of cd-directory
Hi,
I want to install some files in the root directory of the install CD. How can I do that ?
Thanks for any help!
mamilo


have a look at:

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.2
"CopyFiles" command
in combination with $EXEDIR runtime-var