one-click-updates-for-language-packs
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
You should read:
Language Pack XML
By including the update server tag on XML language packs you can have one click updates for extension languages. This needs to be included in the XML language pack and it links to an update server. The Joomla extension update panel checks the installed XML language packs for the version number and update server. If the update server has a more recent version number, it alerts for an updated available.
Update Server Tag
Language pack XML file needs to include (zz-ZZ stands for your language code):
https://update.zzZZ.com/translationlist.xml
See full example here: Creating language packs for extensions in Joomla 2.5
Update Server
A tiny web space is 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
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:
- 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: 2.0.2.1
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 that translation is for!
Details Update Packs
Listed in the translationlist.xml are the different languages packs available to update. Each pack URL and version is 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
zz-ZZ language for Jupiter
zz-ZZ language for Jupiter 2.0.2
file_jupiter_zz-ZZ
file
2.0.2.1
https://joomlacode.org/gf/download/frsrelease/3238/72703/jupiter_202_lang_zz-ZZ_v2021.zip
This can have more than one language pack (inside ... ) but you can only list one extension by file.
Updating Language Files
A translation is a work in progress and requires frequent updates. To deliver your new language files:
- Update the language files
- Edit the language pack XML file for version number
- Publish the new zip pack
- Get URL for a direct download
- Edit the Update server files
- Update the version number in translationlist.xml
- 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 in the Joomla Administrator to get the new language pack installed.