This chapter describes creation of an APS package containing a German translation for Wordpress. Here we will refer to a translation as an add-on – an APS package adding extra functionality to another (master) APS package. You may also use this brief guide to create add-ons for any other applications. Before you create your first APS package, you are recommended to familiarize with the packaging procedure for a master package (see Packaging WordPress Application):
Listed below are the sections of APP-META.xml file supplied with the add-on package:
<service id="de-lang">
<presentation>
<summary>German translation for WordPress</summary>
<changelog>
<version version="2.9.1" release="1">
<entry>German translation for WordPress is packaged.</entry>
</version>
</changelog>
<categories>
<category>Theme</category>
</categories>
<languages>
<language>de</language>
</languages>
</presentation>
To switch Wordpress to German, add the following setting:
<setting id="replace_current_lang" type="boolean" default-value="true">
<name>Activate language</name>
</setting>
<provision>
<url-mapping>
<installed-size>1794048</installed-size>
<mapping url="/" path="htdocs"></mapping>
</mapping>
</url-mapping>
</provision>
Create an APP-META.xml file and begin with adding general details as follows:
<id>http://de.wordpress.org/</id>
<name>German Translation</name>
<version>3.0.5</version>
<release>1</release>
<homepage>http://de.wordpress.org/</homepage>
<master-package>
<package id="http://wordpress.org/">
</master-package>
<vendor>
<name>wordpress</name>
<homepage>http://de.wordpress.org/</homepage>
</vendor>
<packager>
<name>Parallels</name>
<homepage>http://parallels.com/</homepage>
<icon path="images/icon.png" />
<uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri>
</packager>
|
# Metadata container. XML file. |
|
|
|
# This script will be invoked when the add-on is instantiated. |
|
|
|
# Add-on Icon |
|
# Translation files |