Question

Q: How can I customize the language used in custom installer pages?

How can I customize the language used in custom installer pages?

Answer:

You can customize the language used in custom installer page messages using the <customLanguageList> tag, as in the following example:

<customLanguageFileList>
             <language>
                 <code>en</code>
                 <encoding>iso8859-1</encoding>
                 <file>pathToLanguageFiles/myapp_en.lng</file>
             </language>
             <language>
                 <code>de</code>
                 <encoding>iso8859-1</encoding>
                 <file>pathToLanguageFiles/myapp_de.lng</file>
             </language>
            <language>
                 <code>fr</code>
                 <encoding>iso8859-1</encoding>
                 <file>pathToLanguageFiles/myapp_fr.lng</file>
             </language>
        </customLanguageFileList>
        

myapp_de.lng should be a text file with a format similar to this:

database.title=Datenbank auswalhen
        database.explanation=Standard Datenbanken
        datatabase.description=Welche Databank?
        .....
        

and myapp_en.lng:

database.title=Database Selection
        database.explanation=Default database
        datatabase.description=Which database?
        .....
        

and so on with the rest of custom language files. Then, you can for example create a <choiceParameter> page and use:

<choiceParameter>
           <ask>1</ask>
           <default>oracle</default>
           <description>${msg(database.description)}</description>
           <explanation>${msg(database.explanation)}</explanation>
           <title>${msg(database.title)}</title>
           <name>database</name>
           <optionList>
             <option>
               <value>oracle</value>
               <text>Oracle</text>
             </option>
             <option>
               <value>mysql</value>
               <text>Mysql</text>
             </option>
           </optionList>
        </choiceParameter>