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

asked 12 Sep '11, 08:57

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%


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>
link

answered 12 Sep '11, 09:02

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%

How do you parameterize the externalized string? Are there parameter arguments to the "msg" function?

(13 Feb '12, 11:29) briedog

It is not possible to pass arguments to ${msg()} but if the external string contains variables, they will be resolved. So, if you have defined:

database.title=Database ${name}

You could use it as:

<setinstallervariable name="name" value="foo"/> <showinfo text="${msg(database.title)}"/>

(13 Feb '12, 11:58) juanjo ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×31
×27
×11

Asked: 12 Sep '11, 08:57

Seen: 2,469 times

Last updated: 13 Feb '12, 11:58