Difference between revisions of "One click updates for language packs"

From Joomla! Documentation

(A few URL changes.)
Line 13: Line 13:
 
<source lang="php">
 
<source lang="php">
 
<updateservers>
 
<updateservers>
   <server type="collection" priority="1" name="zz-ZZ Language Updates">http://update.zzZZ.com/translationlist.xml</server>
+
   <server type="collection" priority="1" name="zz-ZZ Language Updates">https://update.zzZZ.com/translationlist.xml</server>
 
</updateservers>
 
</updateservers>
 
</source>
 
</source>
Line 20: Line 20:
 
== Update Server ==
 
== Update Server ==
 
A tiny web space its required to state the latest version and URL for downloadable packs. You can post the zip packs in a different domain but all files need to be directly linked!
 
A tiny web space its required to state the latest version and URL for downloadable packs. You can post the zip packs in a different domain but all files need to be directly linked!
'''Good practice:''' to keep it clean you can use a subdomain just for updates as in http://update.zzZZ.com/
+
'''Good practice:''' to keep it clean you can use a subdomain just for updates as in <pre>https://update.zzZZ.com/</pre>
  
 
=== Update server packs list ===
 
=== Update server packs list ===
 
The update server will include one translationlist.xml with all the latest language release versions. This is done with a tag for each extension/language available.
 
The update server will include one translationlist.xml with all the latest language release versions. This is done with a tag for each extension/language available.
  
If you wanto to create an update server list for Joomla + tinyMCE + 2 different components (using the names Jupiter and Pluto as component names) for the zz-ZZ language, the translationlist.xml contents would be:
+
If you want to to create an update server list for Joomla + tinyMCE + 2 different components (using the names Jupiter and Pluto as component names) for the zz-ZZ language, the translationlist.xml contents would be:
 
<source lang="php">
 
<source lang="php">
 
<?xml version="1.0" encoding="utf-8"?>
 
<?xml version="1.0" encoding="utf-8"?>
 
<extensionset name="zz-ZZ Language Updates" description="zz-ZZ Joomla core and extensions languages updates">
 
<extensionset name="zz-ZZ Language Updates" description="zz-ZZ Joomla core and extensions languages updates">
   <extension name="zz-ZZ language for Joomla" element="pkg_zz-ZZ" type="package" version="2.5.4.2" detailsurl="http://update.zzZZ.com/details/zz-ZZ_details.xml"/>
+
   <extension name="zz-ZZ language for Joomla" element="pkg_zz-ZZ" type="package" version="2.5.4.2" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details.xml"/>
   <extension name="zz-ZZ language for TinyMCE" element="file_tinymce_zz-ZZ" type="file" version="3.4.7.1" detailsurl="http://update.zzZZ.com/details/zz-ZZ_details_tinymce.xml"/>
+
   <extension name="zz-ZZ language for TinyMCE" element="file_tinymce_zz-ZZ" type="file" version="3.4.7.1" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details_tinymce.xml"/>
   <extension name="zz-ZZ language for Jupiter" element="file_jupiter_zz-ZZ" type="file" version="2.0.2.1" detailsurl="http://update.zzZZ.com/details/zz-ZZ_details_jupiter.xml"/>
+
   <extension name="zz-ZZ language for Jupiter" element="file_jupiter_zz-ZZ" type="file" version="2.0.2.1" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details_jupiter.xml"/>
   <extension name="zz-ZZ language for Pluto" element="file_pluto_zz-ZZ" type="file" version="3.0.3.1" detailsurl="http://update.zzZZ.com/details/pt-PT_details_pluto.xml"/>
+
   <extension name="zz-ZZ language for Pluto" element="file_pluto_zz-ZZ" type="file" version="3.0.3.1" detailsurl="https://update.zzZZ.com/details/pt-PT_details_pluto.xml"/>
 
</extensionset>
 
</extensionset>
 
</source>
 
</source>
  
 
* element info = same as the XML file name on the language pack  ''file_jupiter_pt-PT.xml''. This name will never change!
 
* element info = same as the XML file name on the language pack  ''file_jupiter_pt-PT.xml''. This name will never change!
* version number = the version number for the latest language pack as stated in version field at the updated XML pack file:   ''<version>2.0.2.1</version>''
+
* version number = the version number for the latest language pack as stated in version field at the updated XML pack file: ''<version>2.0.2.1</version>''
  
 
'''Good practice:''' the translation language version should use the same version number as the extension itself (as in 2.0.2.x) and one more number for each translation version (as in x.x.x.1) so you can easily remember what extension version is that translation good for!
 
'''Good practice:''' the translation language version should use the same version number as the extension itself (as in 2.0.2.x) and one more number for each translation version (as in x.x.x.1) so you can easily remember what extension version is that translation good for!
Line 56: Line 56:
 
     <version>2.0.2.1</version>
 
     <version>2.0.2.1</version>
 
     <downloads>
 
     <downloads>
       <downloadurl type="full" format="zip">http://joomlacode.org/gf/download/frsrelease/3238/72703/jupiter_202_lang_zz-ZZ_v2021.zip</downloadurl>
+
       <downloadurl type="full" format="zip">https://joomlacode.org/gf/download/frsrelease/3238/72703/jupiter_202_lang_zz-ZZ_v2021.zip</downloadurl>
 
     </downloads>
 
     </downloads>
 
     <targetplatform name="joomla" version="2.5"/>
 
     <targetplatform name="joomla" version="2.5"/>

Revision as of 18:57, 9 July 2022

Joomla has the ability to install language packs updates with just one click. This can be done for language core files but also for extensions languages files

Before proceeding:[edit]

You should read:

  1. Extension Manager Update
  2. Creating language packs for extensions in Joomla 2.5

Language pack XML[edit]

by including the "update server" tag on XML language packs you can have oneclick updates for extension languages. This needs to be included in the XML language pack and it links to an update server. Joomla extension update panel checks the installed XML language packs for the version number and update server. If the update server has more recent version number it alerts for an updated available

Update Server tag[edit]

Language pack XML file needs to include (zz-ZZ stands for your language code):

<updateservers>
  <server type="collection" priority="1" name="zz-ZZ Language Updates">https://update.zzZZ.com/translationlist.xml</server>
</updateservers>

See full example here: Creating language packs for extensions in Joomla 2.5

Update Server[edit]

A tiny web space its required to state the latest version and URL for downloadable packs. You can post the zip packs in a different domain but all files need to be directly linked!

Good practice: to keep it clean you can use a subdomain just for updates as in

https://update.zzZZ.com/

Update server packs list[edit]

The update server will include one translationlist.xml with all the latest language release versions. This is done with a tag for each extension/language available.

If you want to to create an update server list for Joomla + tinyMCE + 2 different components (using the names Jupiter and Pluto as component names) for the zz-ZZ language, the translationlist.xml contents would be:

<?xml version="1.0" encoding="utf-8"?>
<extensionset name="zz-ZZ Language Updates" description="zz-ZZ Joomla core and extensions languages updates">
  <extension name="zz-ZZ language for Joomla" element="pkg_zz-ZZ" type="package" version="2.5.4.2" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details.xml"/>
  <extension name="zz-ZZ language for TinyMCE" element="file_tinymce_zz-ZZ" type="file" version="3.4.7.1" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details_tinymce.xml"/>
  <extension name="zz-ZZ language for Jupiter" element="file_jupiter_zz-ZZ" type="file" version="2.0.2.1" detailsurl="https://update.zzZZ.com/details/zz-ZZ_details_jupiter.xml"/>
  <extension name="zz-ZZ language for Pluto" element="file_pluto_zz-ZZ" type="file" version="3.0.3.1" detailsurl="https://update.zzZZ.com/details/pt-PT_details_pluto.xml"/>
</extensionset>
  • element info = same as the XML file name on the language pack file_jupiter_pt-PT.xml. This name will never change!
  • version number = the version number for the latest language pack as stated in version field at the updated XML pack file: <version>2.0.2.1</version>

Good practice: the translation language version should use the same version number as the extension itself (as in 2.0.2.x) and one more number for each translation version (as in x.x.x.1) so you can easily remember what extension version is that translation good for!

Details update packs[edit]

Listed in the translationlist.xml are the different languages packs available to update. Each pack URL and version its stated in an single details xml file for each extension. A details XML file would include the details for that language pack as in: \details\zz-ZZ_details_jupiter.xml

<?xml version="1.0" encoding="utf-8"?>
<updates>
  <update>
    <name>zz-ZZ language for Jupiter</name>
    <description>zz-ZZ language for Jupiter 2.0.2</description>
    <element>file_jupiter_zz-ZZ</element>
    <type>file</type>
    <version>2.0.2.1</version>
    <downloads>
      <downloadurl type="full" format="zip">https://joomlacode.org/gf/download/frsrelease/3238/72703/jupiter_202_lang_zz-ZZ_v2021.zip</downloadurl>
    </downloads>
    <targetplatform name="joomla" version="2.5"/>
  </update>
</updates>

This can have more than one language pack (inside <updates> ... </updates> ) but you can only list one extension by file.

Updating language files[edit]

A translations its a work in progress and require frequent updates. To deliver your new language files you need:

  1. Update the language files.
    1. Edit the language pack XML file for version number
  2. Publish the new zip pack
    1. Get URL for a direct download
  3. Edit the Update server files
    1. Update the version number at translationlist.xml
    2. Update the \details\zz-ZZ_details_jupiter.xml for new translation version number and URL for direct download pack

Users just need to check for updates on Joomla panel to get the new language pack installed!