...
Code Block |
---|
language | xml |
---|
title | install.xml |
---|
|
<resources>
<res id="CustomLangPack.xml_eng" src="i18n/customLangPack.xml_eng"/>
<res id="CustomLangPack.xml_deu" src="i18n/customLangPack.xml_deu"/>
...
<resources> |
A special use case are translations depending on conditions. Language packs don't "know" conditioned translations. You can workaround this by defining one and the same panel for different conditions with a separate panel ID:
Code Block |
---|
language | xml |
---|
title | install.xml |
---|
|
<panels>
...
<panel classname="InstallPanel" id="panel.install.install" condition="Install"/>
<panel classname="InstallPanel" id="panel.install.update" condition="Update"/>
<panel classname="InstallPanel" id="panel.install.uninstall" condition="Uninstall"/>
<panel classname="FinishPanel" id="panel.finish.install" condition="Install"/>
<panel classname="FinishPanel" id="panel.finish.update" condition="Update"/>
<panel classname="FinishPanel" id="panel.finish.uninstall" condition="Uninstall"/>
</panels> |
The translations are divided now depending on the panel ID for the appropriate panel:
Code Block |
---|
language | xml |
---|
title | CustomLangPack.xml_deu |
---|
|
<str id="InstallPanel.panel.install.install.headline" txt="Installation wird durchgeführt" />
<str id="InstallPanel.panel.install.update.headline" txt="Aktualisierung wird durchgeführt" />
<str id="InstallPanel.panel.install.uninstall.headline" txt="Anwendung wird deinstalliert" />
<str id="FinishPanel.panel.install.headline" txt="Die Installation ist beendet" />
<str id="FinishPanel.panel.update.headline" txt="Die Aktualisierung ist beendet" />
<str id="FinishPanel.panel.uninstall.headline" txt="Die Deinstallation ist beendet" /> |
Code Block |
---|
language | xml |
---|
title | CustomLangPack.xml_eng |
---|
|
<str id="InstallPanel.panel.install.install.headline" txt="Installation in progress" />
<str id="InstallPanel.panel.install.update.headline" txt="Update in progress" />
<str id="InstallPanel.panel.install.uninstall.headline" txt="Uninstallation in progress" />
<str id="FinishPanel.panel.install.headline" txt="Installation completed" />
<str id="FinishPanel.panel.update.headline" txt="Update completed" />
<str id="FinishPanel.panel.uninstall.headline" txt="Uninstallation completed" /> |