How to distribute languages for native Joomla! 1.5 extensions?

Moderator: mcsmom

Post Reply
User avatar
LocALiceR
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Sep 15, 2005 4:44 am
Location: Hungary
Contact:

How to distribute languages for native Joomla! 1.5 extensions?

Post by LocALiceR » Sun Feb 03, 2008 9:28 am

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:

Code: Select all

<?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 protected]</authorEmail>
    <authorUrl>http://www.yoursite.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:

Code: Select all

<install version="1.5" client="administrator" type="language">


to this:

Code: Select all

<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.
"Do not give fish to the hungry man teach him how to fish instead"

Post Reply