How to distribute languages for native Joomla! 1.5 extensions
From Joomla! Documentation
Revision as of 08:40, 2 August 2008 by Erdsiger
When you create a translation for a 3PD extension, usually it is included in the package, but sometimes it is distributed separately. In the 2nd case, it may be difficult to tell the user where to upload the language file(s), though it is even more simplier now than was in Joomla! 1.0.x.
To avoid this, by the analogy of the Joomla! 1.5 core languages you can create an installable language pack for a native Joomla! 1.5 extension. You will need to compress the .ini files and an install.xml file for them into a supported archive type with the following code like this for the back-end:
<?xml version="1.0" encoding="utf-8"?> <install version="1.5" client="administrator" type="language"> <tag>xx-XX</tag> <version>1.0</version> <creationDate>YYYY-MM-DD</creationDate> <author>Your Name</author> <name>YourLanguage</name> <authorEmail>email@example.com</authorEmail> <authorUrl>http://www.example.com/</authorUrl> <copyright>Copyright (C) YYYY Copyright Owner. All rights reserved.</copyright> <license>LicenseType</license> <description>[Language name] translation for [extension_name]</description> <files> <filename>xx-XX.[extension_name].ini</filename> </files> <params /> </install>
When an extension has language file(s) for the front-end as well, an additional package should be created. In this case please change the following line of the install.xml file:
<install version="1.5" client="administrator" type="language">
<install version="1.5" client="site" type="language">
Such a language pack can be installed via the Install tab of the Extension Manager screen opened by the Extensions -> Install/Uninstall menu item. The included language file(s) will be uploaded to the appropriate folder.
For a translator, this method allows him/her to specify the authoring details what are rarely added to the header of a language file. This way the end user will know who to contact for occasional proof-reading or just for a thank you.
For a developer, there is no need to add a language installation feature for their extensions that was a feature for some 1.0.x extensions.