Question

I have a question reffering to Izpack Internationalization.

  • The default language I'm using is English. But if the user selects Romanian, I want to add internationalization to every custom element in the installer.

  • FOR EXAMPLE:

    <panel order="0" id="xx">
            <field type="radio" variable="packageType">
            <description align="left" txt="Choose your module type:" id="module.description" />
    
            <spec>
                <choice txt="Choice 1"  value="English Text 1" />
                <choice txt="Choice 2"  value="English Text 2" />
            </spec>
            </field>
    </panel>``
    

** I want to change the value of the english text to romanian.

Researching IzPack, I tried to add a CustomLangPack.xml_rom

<langpack>
    <str id="module.description" txt="Alege tipul tau de afacere:"/>
</langpack>
  • HOWEVER, this does not work.

How can I do this, without using static variables ?

Was it helpful?

Solution 2

I'm back. After hours and hours of battle it finally worked.

How I did it:

OTHER TIPS

Based on the docs for internationalization, you need to add more than just that one file.

To quote:

For instance let's suppose that we use a HtmlInfoPanel. Suppose that we have it in English, French and German. We want to have a French text for french users. Here we add a resource pointing to the French text whose name is HtmlInfoPanel.info_fra. And that's it! English and German users (or anywhere other than in France) will get the default text (denoted by HtmlInfoPanel.info) and the French users will get the French version. Same thing for the other Licence and Info panels.

Assuming that you are trying to customize the messages, which is based on your choice of adding the CustomLangPack.xml_rom file, then you need to add the CustomLangPack.xml_rom file, and you need to modify install.xml.

As an aside, the 3 country code for Romania is ROU and not ROM, ROM is the old country code, however IzPack seems to be using the old ROM code, so that is OK ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top