Rules
The following key suffixes can be translated:
headline
headinfo<number>
The built-in translation of these labels can be overridden in the following way:
- Add custom translations to a IzPack resource CustomLangPack.xml_<ISO3>
- The following translation keys and lookup order can be used:
- If a panel ID is defined:
<Fully_qualified_panel_classname>.<panelId>.<subKey>
- If a panel ID is defined:
<Simple_panel_classname>.<panelId>.<subKey>
- If a panel ID is defined:
<panelId>.<subKey>
- If no panel ID is defined:
<Fully_qualified_panel_classname>.<subkey> - If no panel ID is defined:
<Simple_panel_classname>.<subkey> (for compatibility with IzPack 4 translations) - Steps 1., 2., 4., 5. for the next superclass in the given order
This is repeated for the next superclass of the current class inherited from IzPanel as long as the super class is not the abstract IzPanel itself.
Usage
Headlines on all kind of installer panels can be translated in the following manner:
Create a custom translations file for each language, for instance
...
:
Code Block | ||||
---|---|---|---|---|
| ||||
<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="TargetPanel.headline" txt="Take a deep breath and gimme an installation directory"/>
</izpack:langpack> |
and add it as resource to the installation descriptor using predefined key depending on each language used:
Code Block | ||||
---|---|---|---|---|
| ||||
<resources>
<res id="CustomLangPack.xml_eng" src="i18n/CustomLangPack.xml_eng"/>
</resources>
<panels>
<panel classname="TargetPanel"/>
</panels> |
A more complex example:
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <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"> <!-- Headlines of panels --> <str id="HelloPanel.headline" txt="Willkommen" /> <str id="LicencePanel.headline" txt="Lizenzvereinbarung" /> <str id="TargetPanel.headline" txt="Installationsverzeichnis" /> <str id="PacksPanel.headline" txt="Installationspakete" /> <str id="InstallPanel.headline" txt="Installation läuft" /> <str id="FinishPanel.headline" txt="Installation abgeschlossen" /> <str id="UserInputPanel.panel.tomcatsettings.headline" txt="Tomcat-Einstellungen" /> </izpack:langpack> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<resources> <res id="CustomLangPack.xml_eng" src="i18n/customLangPack.xml_eng"/> <res id="CustomLangPack.xml_deu" src="i18n/customLangPack.xml_deu"/> ... <resources> |
...