Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleinstall.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
languagexml
titleinstall.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
languagexml
titleCustomLangPack.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
languagexml
titleCustomLangPack.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" />