Internationalizing resources
Internationalizing resources
IzPack is available in several languages. However you might want to internationalize some additional parts of your installer. In particular you might want this for the InfoPanel and LicencePanel. This is actually pretty easy to do. You just have to add one resource per localization, suffixed with the ISO3 language code. At runtime these panels will try to load a localized version.
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.
To sum up: add _iso3code to the resource name for InfoPanel, HTMLInfoPanel, LicencePanel, HtmlLicencePanel and PDFLicencePanel.
Internationalizing Messages
You can customize any of the strings defined by the built-in langpacks. Â Add a resource(s) named "CustomLangPack.xml
" and/or "CustomLangPack.xml_iso3code
" to your install.xml
file:
<resources> <res id="CustomLangPack.xml" src="CustomLangPack.xml"/> <res id="CustomLangPack.xml_fra" src="CustomLangPack.xml_fra"/> </resources>
The CustomLangPack.xml file should look something like this:
<izpack:langpack version="5.0" xmlns:izpack="http://izpack.org/schema/langpack" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://izpack.org/schema/langpack http://izpack.org/schema/5.0/izpack-langpack-5.0.xsd"> <str id="installer.reversetitle" txt="IzPack - installation of $APP_NAME $APP_VER"/> Â </izpack:langpack>